Home  >  Article  >  Backend Development  >  phpExcel class exports data from mysql to xls garbled_PHP tutorial

phpExcel class exports data from mysql to xls garbled_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:04:21703browse

php tutorial Excel class exports data to xls garbled code from mysql tutorial

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

//Use PHP to convert it with its own transcoding function iconv and it will be OK.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/630865.htmlTechArticlephp tutorial Excel class exports data to xls garbled code from mysql tutorial $objPHPExcel-setActiveSheetIndex(0) -setCellValue( 'A1', iconv('gbk', 'utf-8', 'Chinese Hello')) -setCellValue('B2', 'wor...
Statement:
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