in reply to OLE::Storage_Lite problems

I suggest basing your code on https://metacpan.org/source/JMCNAMARA/OLE-Storage_Lite-0.19/sample with the sample files

Then if you encounter problems with test.xls not matching sizes, we have a common place to start

Replies are listed 'Best First'.
Re^2: OLE::Storage_Lite problems
by alvinstarr (Initiate) on Apr 16, 2014 at 20:40 UTC
    I used smpaddF.pl and added a section.
    { my $oOl = OLE::Storage_Lite->new('test.xls'); my $oPps = $oOl->getPpsTree(1); die( "test.xls must be a OLE file") unless($oPps); my $oFile = new IO::File; $oFile->open('test.tmp', 'r'); $oPps->save('add_none.xls'); }
    16 -rw-rw-r--. 1 alvin alvin 15872 Apr 16 16:33 add_io2.xls 16 -rw-rw-r--. 1 alvin alvin 15872 Apr 16 16:33 add_io.xls 16 -rw-rw-r--. 1 alvin alvin 15872 Apr 16 16:33 add_name.xls 16 -rw-rw-r--. 1 alvin alvin 14336 Apr 16 16:33 add_none.xls 16 -rw-rw-r--. 1 alvin alvin 15872 Apr 16 16:33 add_test.xls 16 -rw-rw-r--. 1 alvin alvin 15872 Apr 16 16:33 add_tmp.xls 16 -rw-r--r--. 1 alvin alvin 13824 Apr 16 16:31 test.xls
    Test.xls and add_none.xls are different sizes and I expect them to be the same size. Should I not expect them to be the same sizes?

      I think you'll have to ask the author rt://OLE-Storage_Lite

      Day '' out of range 1..31 at .../site/lib/OLE/Storage_Lite.pm line 136 +7. Day '' out of range 1..31 at .../site/lib/OLE/Storage_Lite.pm line 136 +7. Day '' out of range 1..31 at .../site/lib/OLE/Storage_Lite.pm line 136 +7. Day '' out of range 1..31 at .../site/lib/OLE/Storage_Lite.pm line 136 +7. Day '' out of range 1..31 at .../site/lib/OLE/Storage_Lite.pm line 136 +7. go at trythis.pl line 124. new file at trythis.pl line 128. trying to save at trythis.pl line 132. Day '' out of range 1..31 at .../site/lib/OLE/Storage_Lite.pm line 136 +7. end at trythis.pl line 137. 11/23/2009 06:03 PM 13,824 test.xls 04/16/2014 02:21 PM 13,952 add_test.xls 04/16/2014 02:21 PM 12 test.tmp 04/16/2014 02:21 PM 13,952 add_name.xls 04/16/2014 02:21 PM 13,952 add_tmp.xls 04/16/2014 02:21 PM 13,952 add_io2.xls 04/16/2014 02:21 PM 13,952 add_io.xls 04/16/2014 02:21 PM 12,928 add_none.xls

      When I compare test.xls and add_none.xls, (and when I use "strings" program and compare the output), I find test.xls has extra section that is missing in add_none.xls

      when I right click on test.xls and click properties, there are two extra tabs, custom and summary

      All the add_ files are missing these, including add_none

      To me this explains the difference

      Now the fatal error I get which I trap with eval, could be responsible for the missing properties...

      I would ask the author rt://OLE-Storage_Lite if its a mistake (I think its likely) or intentional

        What setting are you using with strings? when I use strings I see the same data but slightly re-ordered.