1

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?

4

0 に答える 0