0

我在我的项目中使用 phpexcel,当我尝试打开 excel 文件时,我收到一条错误消息,提示“excel 在其中发现不可读的内容”这是我的代码:

$objPHPExcel = new PHPExcel();

// Set properties
$objPHPExcel->getProperties()->setCreator(lang('filename'));
$objPHPExcel->getProperties()->setLastModifiedBy(lang('username'));
$objPHPExcel->getProperties()->setTitle(lang('ms_office_xlsx_label'));
$objPHPExcel->getProperties()->setSubject(lang('ms_office_xlsx_label'));
$objPHPExcel->getProperties()->setDescription(lang('testdoc_office_xlsx_label'));
$objPHPExcel->setActiveSheetIndex(0);       
$objPHPExcel = $this->prepareDataForExport($objPHPExcel, $reportType, $values);

我做了一些研究,其中很少有人建议使用 utf-8 我没有找到在哪里使用编码部分?请帮帮我

4

0 回答 0