Copy from XLS Files: Several problems

Topics: Developer Forum, User Forum
Mar 30, 2010 at 7:28 AM

Hello,

 

i try to copy the file 29032010_original.xls to 29032010_copy.xls with follow code:

$objReader = @PHPExcel_IOFactory::createReader('Excel5');
    $objPHPExcel = @$objReader->load("29032010_original.xls");        
    $objPHPExcel->setActiveSheetIndex(0);    
    $objWriter = @PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');


    $tempfile = "29032010_copy.xls";
    
    try
    {
        @$objWriter->save($tempfile);
    }
    catch(Exception $exc)
    {
        echo "<br>".$exc;
        die();
    }

 

i compared both files and detected several differences:

The formula in E67 is missing.

I believe its because the percent?

 

A rule is missing which colors red the percent value and the text in the field E67 if the percent value is higher than 100%. (Like in the original file)

Some formats in the text is different.

 

Thank you,

 

Best,

Florian

 

Mar 30, 2010 at 7:34 AM

You can find both files here: http://phpexcel.codeplex.com/WorkItem/View.aspx?WorkItemId=10749

Apr 6, 2010 at 11:52 AM

Any ideas?

Developer
Apr 8, 2010 at 1:23 AM

Excel5 writer is still buggy when it comes to formulas. There is this work item:
http://phpexcel.codeplex.com/WorkItem/View.aspx?WorkItemId=7895

In particular it can't handle % operator. Unfortunately. Until this is fixed, instead of this:

 

=IF(S27<=100%,"YES","NO")

you can try this:

=IF(S27<=1,"YES","NO")

Apr 12, 2010 at 10:15 AM

Thank you for the information.

Is there a date till the problems are probably fixed?

Till this works i will try it without %.

 

Whats about the other two problems:

The missing rule and the different formats in the files?

 

Thank you,

Florian