Hey guys, has anyone tried making spreadsheets in a 64-bit environment
yet? I've encountered a problem. Let me describe:
I am using Office 2007, latest patches.
I am using Spreadsheet::WriteExcel 2.25.
I'm running Perl 5.10.
1) Generate a spreadsheet within a 32-bit Windows XP environment
2) Copy the spreadsheet to a 64-bit Windows 7 environment.
3) When I try to open the spreadsheet in Win7, I get "Excel found
unreadable content in 'Results.xls'. Do you want to recover the
contents of this workbook?"
4) It will open the spreadsheet, but it clobbers some of the
formatting.
5) The Windows XP environment opens the spreadsheet just fine.
So, I went back to the Windows XP 32-bit environment, and did a "Save
As" to Office 2007 xlsx format. I then copied the xlsx to the Windows
7 64-bit environment, and it opened just fine.
Any ideas? I tried enabling compatibility mode, but that did not help.
My initial guess is that the module may be doing something in a non 64-
bit clean fashion...but I really don't know.
On Nov 5, 10:58 pm, LuckyJ <jason.luttg...@gmail.com> wrote:
> Hey guys, has anyone tried making spreadsheets in a 64-bit environment
> yet? I've encountered a problem. Let me describe:
> ...
> 1) Generate a spreadsheet within a 32-bit Windows XP environment
> 2) Copy the spreadsheet to a 64-bit Windows 7 environment.
> 3) When I try to open the spreadsheet in Win7, I get "Excel found
> unreadable content in 'Results.xls'. Do you want to recover the
> contents of this workbook?"
Hi,
There aren't any 64-bit Windows issues that I am aware of.
The "Unreadable Content" error is usually an indication that the file
is corrupted in some way. A common cause of this on Windows is FTPing
a file in non binary mode. Check that the file size on the host system
is the same on the target system after it is transferred.
I run the 2.25 version under windows 2008 server x64 using Strawberry
Perl 5.8.x and it runs just fine, producing excel files that open
without issue...Have you tried the XP compatibility mode in Win 7?
On Nov 10, 5:54 am, jmcnamara <jmcnam...@cpan.org> wrote:
> On Nov 5, 10:58 pm, LuckyJ <jason.luttg...@gmail.com> wrote:
> > Hey guys, has anyone tried making spreadsheets in a 64-bit environment
> > yet? I've encountered a problem. Let me describe:
> > ...
> > 1) Generate a spreadsheet within a 32-bit Windows XP environment
> > 2) Copy the spreadsheet to a 64-bit Windows 7 environment.
> > 3) When I try to open the spreadsheet in Win7, I get "Excel found
> > unreadable content in 'Results.xls'. Do you want to recover the
> > contents of this workbook?"
> Hi,
> There aren't any 64-bit Windows issues that I am aware of.
> The "Unreadable Content" error is usually an indication that the file
> is corrupted in some way. A common cause of this on Windows is FTPing
> a file in non binary mode. Check that the file size on the host system
> is the same on the target system after it is transferred.
It has nothing to do with 64 bit. It is a Windows 7 issue.
When I open a file generated by Spreadsheet::Writeexcel on Windows 7
in either Excel 2007 or 2003, I get the "Excel found unreadable
content" error. I can open the same file under XP, Vista or OSX
without a problem.
I did a bit of digging and found people were having the same problem
with PHPExcel.
> On Nov 5, 10:58 pm, LuckyJ <jason.luttg...@gmail.com> wrote:
> > Hey guys, has anyone tried making spreadsheets in a 64-bit environment
> > yet? I've encountered a problem. Let me describe:
> > ...
> > 1) Generate a spreadsheet within a 32-bitWindowsXP environment
> > 2) Copy the spreadsheet to a 64-bitWindows7environment.
> > 3) When I try to open the spreadsheet in Win7, I get "Excel found
> > unreadable content in 'Results.xls'. Do you want to recover the
> > contents of this workbook?"
> Hi,
> There aren't any 64-bitWindowsissues that I am aware of.
> The "Unreadable Content" error is usually an indication that the file
> is corrupted in some way. A common cause of this onWindowsis FTPing
> a file in non binary mode. Check that the file size on the host system
> is the same on the target system after it is transferred.
On Nov 19, 7:59 am, rmeichhorn <rmeichh...@gmail.com> wrote:
> Hi John,
> I have experimented with some of the examples, and have found that it
> is using set_properties which causes the problem under Windows 7.
Hi Richard,
Thanks, that indicates that the problem occurs when using
OLE::Storage_Lite for files less than 7MB. In general this only
happens in S::WE when set_properties() is in use. (It may be possible
that the error doesn't occur for files over 4k that use set_properties
() but that probably isn't worth testing).
I don't currently have a copy of Windows 7 so I'll need to get one and
install it in a VM. This may take a few days.
In the meantime perhaps you (or someone else reading along at home)
can help me test this by making some changes to OLE::Storage_Lite.pm.
Either, back up your Storage_Lite.pm module or download version 0.18
and make the changes there.
In the Storage_Lite.pm file you will see the following around line 378
(in version 0.18).
Not a perl savvy but have been using S::WE for a while now. If you have some
time, I don't mind doing a webex session with you and providing a Win 7
environment where you could make the changes and test it out. I am in EST
zone.
On Thu, Nov 19, 2009 at 8:52 AM, jmcnamara <jmcnam...@cpan.org> wrote:
> On Nov 19, 7:59 am, rmeichhorn <rmeichh...@gmail.com> wrote:
> > Hi John,
> > I have experimented with some of the examples, and have found that it
> > is using set_properties which causes the problem under Windows 7.
> Hi Richard,
> Thanks, that indicates that the problem occurs when using
> OLE::Storage_Lite for files less than 7MB. In general this only
> happens in S::WE when set_properties() is in use. (It may be possible
> that the error doesn't occur for files over 4k that use set_properties
> () but that probably isn't worth testing).
> I don't currently have a copy of Windows 7 so I'll need to get one and
> install it in a VM. This may take a few days.
> In the meantime perhaps you (or someone else reading along at home)
> can help me test this by making some changes to OLE::Storage_Lite.pm.
> Either, back up your Storage_Lite.pm module or download version 0.18
> and make the changes there.
> In the Storage_Lite.pm file you will see the following around line 378
> (in version 0.18).
On Nov 19, 2:44 pm, Sanju Shah <sanju.s...@gmail.com> wrote:
> Hi John,
> Not a perl savvy but have been using S::WE for a while now. If you have some
> time, I don't mind doing a webex session with you and providing a Win 7
> environment where you could make the changes and test it out. I am in EST
> zone.
Hi,
Thanks for the kind offer but I should be okay. If I run into problems
I may get back to you.
I made the changes to Storage_Lite.pm as you showed, but it still
doesn't work. I tried changing line 378 first and it didn't work, so
I changed 377 as well.
I had a look at the file generated by properties.pl, and the header is
exactly the same. The value of $iSDBcnt must be evaluating to 1,
which would give the same result.
From byte 0000003C : 00 00 00 00 01 00 00 00
To be sure the change I made to Storage_Lite was being picked up, I
modified other bytes in the header, and they were different.
Did you get a different header when you made the changes?
Cheers,
Richard.
On Nov 19, 11:52 pm, jmcnamara <jmcnam...@cpan.org> wrote:
> On Nov 19, 7:59 am, rmeichhorn <rmeichh...@gmail.com> wrote:
> > Hi John,
> > I have experimented with some of the examples, and have found that it
> > is using set_properties which causes the problem under Windows 7.
> Hi Richard,
> Thanks, that indicates that the problem occurs when using
> OLE::Storage_Lite for files less than 7MB. In general this only
> happens in S::WE when set_properties() is in use. (It may be possible
> that the error doesn't occur for files over 4k that use set_properties
> () but that probably isn't worth testing).
> I don't currently have a copy of Windows 7 so I'll need to get one and
> install it in a VM. This may take a few days.
> In the meantime perhaps you (or someone else reading along at home)
> can help me test this by making some changes to OLE::Storage_Lite.pm.
> Either, back up your Storage_Lite.pm module or download version 0.18
> and make the changes there.
> In the Storage_Lite.pm file you will see the following around line 378
> (in version 0.18).
On Nov 20, 2:55 am, rmeichhorn <rmeichh...@gmail.com> wrote:
> Hi John,
> I made the changes to Storage_Lite.pm as you showed, but it still
> doesn't work. I tried changing line 378 first and it didn't work, so
> I changed 377 as well.
Hi,
I'll look at it in more detail over the weekend. In the meantime could
you try the following program and let me know if it causes problems:
#!/usr/bin/perl -w
use strict;
use Spreadsheet::WriteExcel::Big;
my $workbook = Spreadsheet::WriteExcel::Big->new('olelite.xls');
my $worksheet = $workbook->add_worksheet();
It turns out that the problem was caused by an external patch that I
applied to the OLE::Storage_Lite module shortly after I took over
maintainership. In 2004!!.
It only occurs when creating OLE documents (in this case Excel files)
less than 7MB and only on Windows 7 (32 and 64 bit).
Spreadsheet::WriteExcel uses its own OLE creator for files less than
7MB so this bug has been largely hidden. S::WE only uses
OLE::Storage_Lite for files greater than 7MB or for files less than
7MB when setting document properties via the set_properties() method.
Windows 7 appears to be fussier about the structure of OLE files so it
throws an error when you try to read one of these dodgy
OLE::Storage_Lite files.
> It turns out that the problem was caused by an external patch that I
> applied to the OLE::Storage_Lite module shortly after I took over
> maintainership. In 2004!!.
> It only occurs when creating OLE documents (in this case Excel files)
> less than 7MB and only on Windows 7 (32 and 64 bit).
> Spreadsheet::WriteExcel uses its own OLE creator for files less than
> 7MB so this bug has been largely hidden. S::WE only uses
> OLE::Storage_Lite for files greater than 7MB or for files less than
> 7MB when setting document properties via the set_properties() method.
> Windows 7 appears to be fussier about the structure of OLE files so it
> throws an error when you try to read one of these dodgy
> OLE::Storage_Lite files.
I will be releasing a version of Spreadsheet::WriteExcel shortly that
makes OLE::Storage_Lite 0.19 a prerequisite. This should eliminate
these issues in future.