本文整理汇总了PHP中getImportExcelData函数的典型用法代码示例。如果您正苦于以下问题:PHP getImportExcelData函数的具体用法?PHP getImportExcelData怎么用?PHP getImportExcelData使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getImportExcelData函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: ImportFromExcel
function ImportFromExcel($uploadfile)
{
$autoinc = false;
$ret = 1;
global $error_message, $keys, $goodlines, $total_records, $conn, $strOriginalTableName, $strTableName, $keys_present;
$data = openImportExcelFile($uploadfile);
// populate field names array
$fields = array();
$fields = getImportExcelFields($data);
$fields = getFieldNamesByHeaders($fields);
$keys_present = 1;
for ($k = 0; $k < count($keys); $k++) {
if (!in_array(RemoveFieldWrappers($keys[$k]), $fields)) {
$keys_present = 0;
break;
}
}
$ret = getImportExcelData($data, $fields);
return $ret;
}
开发者ID:aagusti,项目名称:padl-tng,代码行数:20,代码来源:pad_pad_spt_type_import.php
示例2: ImportFromExcel
function ImportFromExcel($uploadfile)
{
$autoinc = false;
$ret = 1;
global $error_message, $keys, $goodlines, $total_records, $conn, $strOriginalTableName, $strTableName, $keys_present;
$data = openImportExcelFile($uploadfile);
// populate field names array
$fields = array();
$fields = getImportExcelFields($data);
$fields = getFieldNamesByHeaders($fields);
$keys_present = 1;
for ($k = 0; $k < count($keys); $k++) {
if (!in_array(RemoveFieldWrappers($keys[$k]), $fields)) {
$keys_present = 0;
break;
}
}
if (in_array("Record ID", $fields)) {
$autoinc = true;
}
if ($autoinc) {
$sql = "SET IDENTITY_INSERT " . AddTableWrappers($strOriginalTableName) . " ON";
db_exec($sql, $conn);
}
$ret = getImportExcelData($data, $fields);
if ($autoinc) {
$sql = "SET IDENTITY_INSERT " . AddTableWrappers($strOriginalTableName) . " OFF";
db_exec($sql, $conn);
}
return $ret;
}
开发者ID:samsulpendis,项目名称:Instant_Appointment,代码行数:31,代码来源:Readings_import.php
示例3: ImportFromExcel
function ImportFromExcel($uploadfile, $strOriginalTableName, $ext, $keys, &$keys_present, &$total_records, &$error_message, &$goodlines, $pageObject, $cipherer)
{
global $conn, $strTableName;
$autoinc = false;
$ret = 1;
$data = openImportExcelFile($uploadfile);
// populate field names array
$fields = array();
$fields = getImportExcelFields($data);
$fields = getFieldNamesByHeaders($fields, $strOriginalTableName, $ext);
if($fields == null) // if error happened
return;
$keys_present=1;
for($k=0; $k<count($keys); $k++)
{
if (!in_array(RemoveFieldWrappers($keys[$k]),$fields))
{
$keys_present=0;
break;
}
}
if(in_array("id",$fields))
$autoinc=true;
if(GetDatabaseType() == 2 && $autoinc)
{
$sql = "SET IDENTITY_INSERT ".AddTableWrappers($strOriginalTableName)." ON";
db_exec($sql,$conn);
}
$ret = getImportExcelData($data, $fields, $error_message, $goodlines, $keys, $keys_present, $strOriginalTableName, $pageObject, $cipherer, $autoinc, $total_records);
if(GetDatabaseType() == 2 && $autoinc)
{
$sql="SET IDENTITY_INSERT ".AddTableWrappers($strOriginalTableName)." OFF";
db_exec($sql,$conn);
}
return $ret;
}
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:49,代码来源:webreport_users_import.php
注:本文中的getImportExcelData函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论