Re: Perl script help (230 Views)
Occasional Contributor
Posts: 3
Registered: ‎08-19-2011
Message 1 of 2 (256 Views)

Perl script help

[ Edited ]

Hello Forum,

I have some text files and I want to export them into 1 excel file.Let's say text files are like  





What I want to get these text files into an excel file called as "final.xls" and When I open it I want to see the sheets as






is it possible?


PS:I have downloaded and installed Spreadsheet-WriteExcel-2.37 over my unix perl env.




Honored Contributor
Posts: 6,271
Registered: ‎12-02-2001
Message 2 of 2 (230 Views)

Re: Perl script help

Yes, it is possible.


See the documentation of the Spreadsheet::WriteExcel perl module:


The Quick Start lists 3 steps required when creating an Excel file:

  1. create a "workbook" (= the Excel file) using the new() method
  2. create a worksheet in the workbook using the add_worksheet() method
  3. write() to the worksheet. (write_row() or write_col() might be useful too).

When you want to create another worksheet, simply perform the step 2 again using the original workbook object. It will give you a new worksheet object, referring to the next worksheet.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.