我正在阅读这个 Excel 文件:
使用PHPExcel但它看起来像这样:
我正在使用这段代码:
$objReader = PHPExcel_IOFactory::createReaderForFile("data/".$file_name);
$objReader->setLoadSheetsOnly(array(0));
$objPHPExcel = $objReader->load("data/".$file_name);
echo '<table border="1">';
for ($row = 1; $row < $number_of_rows; $row++) {
echo '<tr>';
for ($column = 0; $column < $number_of_columns; $column++) {
$value = $objPHPExcel->setActiveSheetIndex(0)->getCellByColumnAndRow($column, $row)->getValue();
echo '<td>';
$newValue = iconv("ISO-8859-1", "UTF-8", $value); //has no effect
// echo $newValue . ' ';
echo $value . ' ';
echo '</td>';
}
echo '</tr>';
}
echo '</table>';
die;
如何正确读取 Excel 工作表中的德语字符?