Feb 20, 2013 at 1:29 PM
Edited Feb 20, 2013 at 1:48 PM
First, I'd like to say that this project is just a life savior to me. It's just perfect for what I need.
I'm doing quite a simple thing here, I have a .xlsx that I need to show "as is" inside an HTML page.
Here is the code I use to achieve this:
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');
$inputFileType = 'Excel2007';
$inputFileName = '../Comparison_Matrix_v2.xlsx';
$inputWorkseet = 'web';
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objReader->load($inputFileName);
$objWriter = new PHPExcel_Writer_HTML($objPHPExcel);
Now my problem is with $objPHPExcel->getActiveSheet()->removeRow(1,2);
It successfully removes the first two rows (which are a title and a blank row) but I need to delete the 10 first rows. When I do this:
The layout is gone for the beginning of my document and I don't understand why. Do you think it may be because of my xlsx file? How can I make sure of it?
Maybe there's another approach, the ideal would be to set the cells range I need and send only this range to HTML writer, but I did not find how to do this.
EDIT : the whole thing is hosted on a private server under my complete control, CENTOS 6.3 x86_64, PHP 5.3.21 and PHPExcel fresh from yesterday so it must be 1.7.8, you can find the xlsx file I'm using here :