- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Perl script help
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2012 07:38 AM - edited 07-17-2012 07:41 AM
07-17-2012 07:38 AM - edited 07-17-2012 07:41 AM
Perl script help
Hello Forum,
I have some text files and I want to export them into 1 excel file.Let's say text files are like
a.txt
b.txt
c.txt
d.txt
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
a.txt--->sheet1
b.txt--->sheet2
c.txt---->sheet3
d.txt---->sheet4
is it possible?
PS:I have downloaded and installed Spreadsheet-WriteExcel-2.37 over my unix perl env.
- Tags:
- Perl
- Perl script help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2012 05:21 AM
07-18-2012 05:21 AM
Re: Perl script help
Yes, it is possible.
See the documentation of the Spreadsheet::WriteExcel perl module:
http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel-2.37/lib/Spreadsheet/WriteExcel.pm
The Quick Start lists 3 steps required when creating an Excel file:
- create a "workbook" (= the Excel file) using the new() method
- create a worksheet in the workbook using the add_worksheet() method
- 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.