THIS APPLIES TO THE DEFAULT PPM FROM ACTIVESTATE, newer versions
allow for cell notation. The ActiveState version is .27 and
the latest CPAN version is .34. I recommend upgrading, see
end of node for instructions.
The
write method is expecting a row and column
not a cell name like Excel. So the
write
method call becomes:
$worksheet->write('3' , '0', '=Results.xls!D4' );
# row4 columnA
The loop will have to be changed to used the row, column vs.
the cell name.
The documentation also notes that functions are not
supported, but I am not sure if that effects this code or not
since you are merely creating the functions and not
running them. I opened the spreadsheet and clicked on
the A4 cell and it gave a file not found since I don't
have a Result.xls so I think it will work.
Hope this helps.
This a fairly generic how to install any module on Win32
without using PPM as long as the module has no XS code.
You can get the latest version installed and the code will work
as shown (i think) if you have .34 by doing the following
on Win32:
Download the Spreadsheet::Excel .34 tar.gz form
CPAN
Extract the tar.gz
Go to the directory created
In a console (dos window)
ppm install Parse::RecDescent (dependency)
perl Makefile.PL
nmake
nmake test
nmake install
There is a link to nmake
here.
Make sure you put nmake in your path.
I would recommend perl -MCPAN -e "install Spreadsheet::WriteExcel", but there is
more setup involved and it seems the tar.gz is faulty for
Spreadsheet::Write. I had a problem in both the Perl Tar
module and WinZip.