Home > php教程 > php手册 > phpExcel类从mysql中将数据导出到xls乱码

phpExcel类从mysql中将数据导出到xls乱码

WBOY
Release: 2016-06-13 10:07:26
Original
1362 people have browsed it

php教程Excel类从mysql教程中将数据导出到xls乱码

$objPHPExcel->setActiveSheetIndex(0)
  ->setCellValue('A1', iconv('gbk', 'utf-8', '中文Hello'))
  ->setCellValue('B2', 'world!')
  ->setCellValue('C1', 'Hello')
  ->setCellValue('D2', 'world!');

//用php 用自带转码函数iconv转换一下就OK了。

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template