Home: Perl Programming Help: Win32 Programming Help:
Creating Excel File in Perl


Feb 1, 2011, 2:21 PM

Views: 12632
Creating Excel File in Perl

I have managed to write a script that logs in to a website using HTTP::Cookies.

I then open a link to a php script which starts an excel download. I have figured out how to get the PHP script to run and to give me the Excel data via LWP.

Now that I have all the excel data, it is easy for me to output the data to a file such as, "abc.xls". Which I have done. When I open that xls file it says that, "The file you are trying to open "abc.xls", is in a different format than specified by the file extension."

I click Yes to open it and it opens fine.

Now my questions:

1) How can I save this data the proper way to an Excel file, so it does not give me this message?

2) How can I take the data and save it as a new Worksheet in an already existing Excel file?


Feb 1, 2011, 6:41 PM

Views: 12628
Re: [halis] Creating Excel File in Perl

So the nature of my problem has changed. I am now able to write basic data to a worksheet.

I still need to know how to create a new worksheet. And then I need to know how to fill that worksheet with an LWP response object...