Strange behavior through HTML writer [partly fixed]

Topics: Developer Forum
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/');
    include 'PHPExcel/IOFactory.php';

    $inputFileType = 'Excel2007';
    $inputFileName = '../Comparison_Matrix_v2.xlsx';
    $inputWorkseet = 'web';

    $objReader = PHPExcel_IOFactory::createReader($inputFileType);
    $objPHPExcel = $objReader->load($inputFileName);


    $objWriter = new PHPExcel_Writer_HTML($objPHPExcel);
    echo $objWriter->generateStyles(true); 
    echo $objWriter->generateSheetData();
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 :
Feb 20, 2013 at 3:32 PM
Edited Feb 20, 2013 at 3:45 PM
I've just noticed that the columns doesn't have the same width, B to G should have the same width (63 pixels) but they don't, any idea why?

EDIT : OK, I managed to find a workaround for my HTML writer behavior, I'm not deleting rows anymore just hide them and it's working as expected now (and a little faster or it's just me?). So the only thing now is the floating width thing.