Skip Menu |

This queue is for tickets about the Spreadsheet-WriteExcel-Simple CPAN distribution.

Report information
The Basics
Id: 9376
Status: resolved
Priority: 0/
Queue: Spreadsheet-WriteExcel-Simple

People
Owner: Nobody in particular
Requestors: POBrien [...] seic.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.03



Subject: SpreadSheet::WriteExcel::Simple
Date: Mon, 3 Jan 2005 12:56:05 -0500
From: "OBrien, Patrick W." <POBrien [...] seic.com>
To: <tony [...] tmtm.com>
Download file0124.bmp
image/bmp 235.8k

Message body is not shown because sender requested not to inline it.

Tony, I tried this on Windows XP SP1 with Office 2003. I was unable to view the Excel spreadsheet. I received no errors. The test code and screen capture of the open of the spreadsheet are below. Let me know if there is something else I may supply you with to diagnose the problem. use strict; use warnings; use diagnostics; use Spreadsheet::WriteExcel::Simple; my @Array = ('a','b','c'); my $ss = Spreadsheet::WriteExcel::Simple->new; $ss = Spreadsheet::WriteExcel::Simple->new; $ss->write_bold_row(\@Array); $ss->write_row(\@Array); $ss->save("g:\\download\\crap.xls"); <<file0124.bmp>> Patrick W. O'Brien | SEI INVESTMENTS | 1 Freedom Valley Drive | Oaks, PA 19456 | voice 610.676.1437 | fax 484.676.1437 | POBRIEN@seic.com
[POBrien@seic.com - Mon Jan 3 17:37:20 2005]: Show quoted text
> I tried this on Windows XP SP1 with Office 2003. I was unable > to view the Excel spreadsheet. I received no errors. The test code and > screen capture of the open of the spreadsheet are below. Let me know if > there is something else I may supply you with to diagnose the problem.
This works just fine for me on Linux, so I'm guessing it's probably a Windows thing. I've no idea where to look for something like this as I don't use Perl on Windows... Tony
From: ken.prows#online-rewards.com
This problem is caused because the save sub does not use binmode, which is required on windows. The following code should correct the problem: sub save { my $self = shift; my $name = shift or die 'save() needs a file name'; open(FILE, ">$name") or die "Could not open $name for writing: $!"; binmode FILE; # for Windows print FILE $self->data; close FILE; }
Show quoted text
> This problem is caused because the save sub does not use binmode, > which is required on windows. The following code should correct the > problem:
Sorry for the delay, but this has now been applied. New version on CPAN now. Thanks, Tony