PEAR Spreadsheet_Excel_Writer insertBitmap() not working correctly

别来无恙 提交于 2019-12-11 11:37:49

问题


I have to add a image to the spreadsheet using PEARL Spreadsheet_Excel_Writer library and I have used insertBitmap() method for that, but after the execution of the code, the file is created and when going to open the file it will gives me below error:

Excel found unreadable content in 'testXls.xls'. Do you want to recover the content of workbook? ......

This is how I'm adding the image in the code,

$excel = new Spreadsheet_Excel_Writer($saveDirectory);
$sheet =& $excel->addWorksheet('Class I');
$sheet->insertBitmap( 2 , 2 , 'upload_files/1.bmp' , 1 , 1 , 2 , 2 );

Without insertBitmap() method file is perfectly save and open.

Anyone has any ideas why this error arise?

来源:https://stackoverflow.com/questions/13796992/pear-spreadsheet-excel-writer-insertbitmap-not-working-correctly

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!