php phpexcel-phpexcel 导入 excel出现问题,求解答

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php phpexcel-phpexcel 导入 excel出现问题,求解答相关的知识,希望对你有一定的参考价值。

参考技术A 将这个1.xlsx的另存为2003或2000的.xls文件再导入一下试试。

php 所有导入插件功能

// http://www.wpallimport.com/documentation/advanced/execute-php/
function company_mapping( $company_id = "" ) {
	$company_id = ( $company_id!="NULL" && $company_id > 0 ) ? $company_id : "" ;
	if( !empty($company_id) ){
		$old_comp_names = [
			"1" => "Invest Edinburgh",
			"2" => "Scottish Development International",
			"3" => "Schroders",
			"4" => "CFA Institute",
			"5" => "IDA Ireland",
			"6" => "Thincats",
			"9" => "CWEIC",
			"10" => "People's",
			"13" => "Southbank Investment Research",
			"15" => "Fisher Investments UK",
			"16" => "ACCA",
			"17" => "CMC Markets",
			"18" => "Charles Stanley",
			"19" => "Bucherer",
			"20" => "Infinox",
			"21" => "Netwealth",
			"22" => "Appscatter",
			"23" => "Estée Lauder",
			"24" => "Cass",
			"25" => "Markets",
			"26" =>	"Interactive Investor"
		];
		$query = new WP_Query(array(
			'post_type' => 'talk',
			'post_status' => 'publish',
			'posts_per_page' => -1
		));
		while ($query->have_posts()) {
			$query->the_post();
			$post_id = get_the_ID();
			if( get_the_title() == $old_comp_names[$company_id] ){
				return $post_id;
			}
		}
		wp_reset_query();
	}
    return "";
}



function clear_null( $value ) {
	if( empty($value) || $value == "NULL" )
		return "";
}

function cityam_user_login_name( $email, $fn, $ln, $fulln ) {
	if($email)
		return $email;
	if($fulln)
		return $fulln."-guest-contributor@cityam.com";
	if($fn)
		return $fn.$ln."-guest-contributor@cityam.com";
	if($ln)
		return $ln."-guest-contributor@cityam.com";

	return "";
}

function cityam_role_mapping( $old_role_id, $is_citytalk_admin ) {
	if( $old_role_id == 9 && $is_citytalk_admin == 1 ){
    if( $is_citytalk_admin == 1 || $is_citytalk_admin == "1"  )	
			return "city_talks_admin";		
		return "city_talks_author";		
	}
	if( $old_role_id == 3 )
		return "city_am_admin";
	if( $old_role_id == 5 )	
		return "city_am_publisher";		
	if( $old_role_id == 7 )
		return "city_am_admin";
	if( $old_role_id == 8 )	
		return "city_am_contributor";		
	if( $old_role_id == 10 )	
		return "city_am_guest_contributor";
}

以上是关于php phpexcel-phpexcel 导入 excel出现问题,求解答的主要内容,如果未能解决你的问题,请参考以下文章

PHP把MSSQL数据导入到MYSQL的方法

php中如何导入导出CSV格式的文件

php 导入/导出 csv 文件

Sublime Text 导入 php 类有啥解决方案吗?类似于 Netbeans 上的“快速导入”的东西?

导入php文件时的问题

为啥不支持将 PHP 函数导入当前命名空间