(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.