2

I have an excel file that has been created and saved as an Excel 97-2003 file. I am using the following code to read and then write using PHPExcel.

$objReader = new \PHPExcel_Reader_Excel5();

$objPHPExcel = $objReader->load(storage_path() . "/exports/file.xls");

$objPHPExcel->getActiveSheet()->SetCellValue('B1', 'Test Message');

$objWriter = new \PHPExcel_Writer_Excel5($objPHPExcel);

$objWriter-> save(storage_path() . "/exports/file.xls");

I'm using SamApp ExcelSMS Android app that will then read the file. The only problem is that the file is now incompatible when overwritten with new content. Also, the file size decreases from 18KB to 5KB.

Any help on this is greatly appreciated.

pnuts
  • 58,317
  • 11
  • 87
  • 139
BXD
  • 21
  • 2
  • By speaking to SamApp developer, I have been informed that Beginning of File (BOF) has not been found. I thought the BOF and EOF automatically gets added unless I'm doing something wrong. – BXD Aug 18 '15 at 14:57

0 Answers0