PHP Export Excel garbled problem
Recently in doing a PHP import export Excel;
Try Phpexcel and spreadsheet_excel_writer are not good use, save Local is useful, but output browser is garbled, and can see garbled file should be the current page of HTML. Who can fix this?
Create a Processing object instance
$objExcel = new Phpexcel ();
//*************************************
Set document basic Properties
$objProps = $objExcel->getproperties ();
$objProps->setcreator ("Zeal Li");
$objProps->setlastmodifiedby ("Zeal Li");
$objProps->settitle ("Office XLS Test Document");
$objProps->setsubject ("Office XLS Test Document, Demo");
$objProps->setdescription ("Test document, generated by Phpexcel.");
$objProps->setkeywords ("Office Excel Phpexcel");
$objProps->setcategory ("Test");
//*************************************
Sets the current sheet index for subsequent content operations.
It is generally only necessary to display a call when multiple sheet are used.
By default, Phpexcel automatically creates the first sheet to be set sheetindex=0
$objExcel->setactivesheetindex (0);
$objActSheet = $objExcel->getactivesheet ();
Sets the name of the currently active sheet
$objActSheet->settitle (' Testsheet ');
The file saved on the server is OK, but there is a problem with the file that pops up on the client.
Garbled as:
Xing yo?;?
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ???????????????? b?=?r8x "1? Calibri??????????????????????? 8??????????? Vast cabinet? f??? F?? Hot??????????? 櫶 櫶 虣? 虣 3f? Hot 櫶?? FF 枛 3f3 檉 333?? F33333testsheet?? G??
$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$} $}!! $} "" $}##$}$$$}%%$}&&$} "$} (($})) $}**$}++$},,$}--$}: $}//$}00$}11$}22$}33$}44$}55$}66$}77$}88$}99$}::$};; $}<<$}==$}>>$}?? $}@@$}aa$}bb$}cc$}dd$}ee$}ff$}gg$}hh$}ii$}jj$}kk$}ll$}mm$}nn$}oo$}pp$}qq$}rr$}ss$}tt$}uu$}vv$}ww$}xx$}yy$}zz$} [[$}\\$}]] $} ^^ $}__$} ' $}aa$}bb$}cc$}dd$}ee$}ff$}gg$}hh$}ii$}jj$}kk$}ll$}mm$}nn$}oo$}pp$}qq$}rr$}ss$}tt$}uu$}vv$}ww$}xx$} yy$}zz$}{{$}| | $}}}$}~~$}$}?$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$} $}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$ }$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}$}?$*+?? &ffffff? ' Ffffff? (?)?" dxx333333?333333?>?@
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.