After updating Excel today and I get an error opening files generated
by Spreadsheet::WriteExcel.
"File Error: data may have been lost."
Here's a link I found which I think is related.
Has anyone experienced similar behaviour?
Hi,
I guess that you are referring to the Office Service Pack 3 (SP3)
update.
I installed it and tried it with S::WE version 2.20 and 60+ files from
the examples dir of the distro and didn't encounter any problems.
However, SP3 contains a previous security patch, KB918419, which
caused problems like you describe when using set_column() with an
invalid $last_col argument:
$worksheet->set_column(1, 1, 20); # OK
$worksheet->set_column(2, 0, 30); # Error!!
This was patched in S::WE version 2.18.
If you using a version before that then see if an upgrade fixes your
problem (or else check all of your set_column() statements).
If that doesn't fix the problem then let me know. Try to generate an
example program as follows:
http://groups.google.com/group/spreadsheet-writeexcel/browse_frm/thread/23c26520737d753b
John.
--
#!C:/Perl/bin/perl.exe -w
use strict;
use warnings;
use Spreadsheet::WriteExcel;
my $workbook = Spreadsheet::WriteExcel->new('test.xls' );
my $worksheet = $workbook -> add_worksheet();
$worksheet->write(0,0,'hello');
$worksheet->write(0,0,'goodbye');
__ END PROGRAM___
Opening the file in Office2007 yields the following error "File error:
data may have been lost", after which the file opens with only "hello"
showing in cell A1.
After installing, ExcelViewer2003 from Microsoft, and if I open the
excel specifically through that program, the file opens correctly and
without error, displaying only "goodbye" in A1.
It's VERY frustrating.
Perl version : 5.008008
OS name : MSWin32
Module versions: (not all are required)
Spreadsheet::WriteExcel 2.18
Parse::RecDescent 1.94
File::Temp 0.16
OLE::Storage_Lite 0.13
IO::Stringy 2.110
C:\Users\Micah\Desktop\PerlScripts>
Thanks,
- Micah
> http://groups.google.com/group/spreadsheet-writeexcel/browse_frm/thre...
>
> John.
> --
Hi,
This is probably the problem that the OP was referring to above.
I can confirm that this also happens in Excel 2003 with Office SP3
applied.
Arrrrrrrrrrrrgh!!!!
John.
--
Just thought I would add.
-- micah