I think you'll have to ask the author rt://OLE-Storage_Lite
# OLE::Storage_Lite Sample
# Name : smpadd.pl
# by Kawai, Takanori (Hippo2000) 2000.12.21, 2001.1.4, 2001.3.1
#=================================================================
use strict;
use OLE::Storage_Lite;
#0. prepare test file
open OUT, ">test.tmp";
print OUT "1234567890";
close OUT;
#1. Normal
{
my $oOl = OLE::Storage_Lite->new('test.xls');
my $oPps = $oOl->getPpsTree(1);
die( "test.xls must be a OLE file") unless($oPps);
my $oF = OLE::Storage_Lite::PPS::File->new(
OLE::Storage_Lite::Asc2Ucs('Add Strting Len 5'),
'12345');
my $oF2 = OLE::Storage_Lite::PPS::File->new(
OLE::Storage_Lite::Asc2Ucs('Length 0'),
'');
push @{$oPps->{Child}}, $oF;
push @{$oPps->{Child}}, $oF2;
eval {
$oPps->save('add_test.xls');
1;
} or warn $@;
}
#2. Tempfile
{
my $oOl = OLE::Storage_Lite->new('test.xls');
my $oPps = $oOl->getPpsTree(1);
die( "test.xls must be a OLE file") unless($oPps);
my $oF = OLE::Storage_Lite::PPS::File->newFile(
OLE::Storage_Lite::Asc2Ucs('Add tempfile Len 6'),
);
my $oF2 = OLE::Storage_Lite::PPS::File->newFile(
OLE::Storage_Lite::Asc2Ucs('Length 0'),
'');
$oF->append('123456');
push @{$oPps->{Child}}, $oF;
push @{$oPps->{Child}}, $oF2;
eval {
$oPps->save('add_tmp.xls');
1;
} or warn $@;
}
#3. Filename
{
my $oOl = OLE::Storage_Lite->new('test.xls');
my $oPps = $oOl->getPpsTree(1);
die( "test.xls must be a OLE file") unless($oPps);
my $oF = OLE::Storage_Lite::PPS::File->newFile(
OLE::Storage_Lite::Asc2Ucs('Add filename Len b'),
'test.tmp');
my $oF2 = OLE::Storage_Lite::PPS::File->newFile(
OLE::Storage_Lite::Asc2Ucs('Length 0'),
'');
$oF->append('a');
push @{$oPps->{Child}}, $oF;
push @{$oPps->{Child}}, $oF2;
eval {
$oPps->save('add_name.xls');
1;
} or warn $@;
}
#4. IO::File
{
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+');
my $oF = OLE::Storage_Lite::PPS::File->newFile(
OLE::Storage_Lite::Asc2Ucs('Add IO::File Len c'),
$oFile);
my $oF2 = OLE::Storage_Lite::PPS::File->newFile(
OLE::Storage_Lite::Asc2Ucs('Length 0'),
'');
$oF->append('b');
push @{$oPps->{Child}}, $oF;
push @{$oPps->{Child}}, $oF2;
eval {
$oPps->save('add_io.xls');
1;
} or warn $@;
}
#4.1 IO::File(r)
{
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');
my $oF = OLE::Storage_Lite::PPS::File->newFile(
OLE::Storage_Lite::Asc2Ucs('Add IO2::File Len c'),
$oFile);
my $oF2 = OLE::Storage_Lite::PPS::File->newFile(
OLE::Storage_Lite::Asc2Ucs('Length 0'),
'');
$oF->append('b'); #No Work
push @{$oPps->{Child}}, $oF;
push @{$oPps->{Child}}, $oF2;
eval {
$oPps->save('add_io2.xls');
1;
} or warn $@;
}
{
warn "go";
my $oOl = OLE::Storage_Lite->new('test.xls');
my $oPps = $oOl->getPpsTree(1);
die( "test.xls must be a OLE file") unless($oPps);
warn "new file";
my $oFile = new IO::File;
$oFile->open('test.tmp', 'r');
binmode $oFile ;
warn "trying to save";
eval {
$oPps->save('add_none.xls');
1;
} or warn $@;
warn "end";
}
__END__
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