Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Bad excel docs with Spreadsheet::WriteExcel::Simple

Reply
Thread Tools

Bad excel docs with Spreadsheet::WriteExcel::Simple

 
 
Erica
Guest
Posts: n/a
 
      09-05-2003
I've been trying to create an excel document with
SpreadSheet::WriteExcel::Simple on Windows 2000 Server, and open it
with MS Excel 7.0 (old, I know, but all my more recent copies seem to
be on bad CDs).
A 6.0 KB file is created, but when I try open the Excel file in Excel
I get an error, "Cannot access xxx.xls."

This is what I'm doing:
use Spreadsheet::WriteExcel::Simple;

$ss = Spreadsheet::WriteExcel::Simple->new;
@headings = ("One", "Two", "Three");
@headings = ("1", "2", "3");
$ss->write_bold_row(\@headings);
$ss->write_row(\@data);
open FILE, ">xxx.xls";
print FILE $ss->data;
close FILE;

Does anyone have any ideas about what I might be doing wrong?

Thanks,
Erica
 
Reply With Quote
 
 
 
 
Jay Tilton
Guest
Posts: n/a
 
      09-05-2003
(Erica) wrote:

: I've been trying to create an excel document with
: SpreadSheet::WriteExcel::Simple on Windows 2000 Server, and open it
: with MS Excel 7.0 (old, I know, but all my more recent copies seem to
: be on bad CDs).
: A 6.0 KB file is created, but when I try open the Excel file in Excel
: I get an error, "Cannot access xxx.xls."
:
: This is what I'm doing:
: use Spreadsheet::WriteExcel::Simple;
:
: $ss = Spreadsheet::WriteExcel::Simple->new;
: @headings = ("One", "Two", "Three");
: @headings = ("1", "2", "3");
: $ss->write_bold_row(\@headings);
: $ss->write_row(\@data);
: open FILE, ">xxx.xls";
: print FILE $ss->data;
: close FILE;
:
: Does anyone have any ideas about what I might be doing wrong?

An Excel worksheet file contains binary data.
binmode() the filehandle before writing.

 
Reply With Quote
 
 
 
 
John M. Gamble
Guest
Posts: n/a
 
      09-05-2003
In article <>,
Jay Tilton <> wrote:
> (Erica) wrote:
>
>: I've been trying to create an excel document with
>: SpreadSheet::WriteExcel::Simple on Windows 2000 Server, and open it
>: with MS Excel 7.0 (old, I know, but all my more recent copies seem to
>: be on bad CDs).
>: A 6.0 KB file is created, but when I try open the Excel file in Excel
>: I get an error, "Cannot access xxx.xls."
>:
>: This is what I'm doing:
>: use Spreadsheet::WriteExcel::Simple;
>:
>: $ss = Spreadsheet::WriteExcel::Simple->new;
>: @headings = ("One", "Two", "Three");
>: @headings = ("1", "2", "3");
>: $ss->write_bold_row(\@headings);
>: $ss->write_row(\@data);
>: open FILE, ">xxx.xls";
>: print FILE $ss->data;
>: close FILE;
>:
>: Does anyone have any ideas about what I might be doing wrong?
>
>An Excel worksheet file contains binary data.
>binmode() the filehandle before writing.
>


Also, i suspect the second @headings assignment was meant to be
a @data assignment. I know, i'm critiquing an example, but just
in case.

--
-john

February 28 1997: Last day libraries could order catalogue cards
from the Library of Congress.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
integer >= 1 == True and integer.0 == False is bad, bad, bad!!! rantingrick Python 44 07-13-2010 06:33 PM
Bad media, bad files or bad Nero? John Computer Information 23 01-08-2008 09:17 PM
ActiveX apologetic Larry Seltzer... "Sun paid for malicious ActiveX code, and Firefox is bad, bad bad baad. please use ActiveX, it's secure and nice!" (ok, the last part is irony on my part) fernando.cassia@gmail.com Java 0 04-16-2005 10:05 PM
24 Season 3 Bad Bad Bad (Spoiler) nospam@nospam.com DVD Video 12 02-23-2005 03:28 AM
24 Season 3 Bad Bad Bad (Spoiler) nospam@nospam.com DVD Video 0 02-19-2005 01:10 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57