Shell script - Excel/CSV file - More than one tab

Hi All,

Following is my requirement. I have searched the site and found some threads which has same queries, but non of them have any answer. I thought of posting it once more.

We are generating different reports through shell script after we finish our data load. Currently there are 7 such reports. Its a CSV file. Once a report generation completes, shell script send the file to respective receipents. With above process, it sends 7 mails each has seperate report to a user.

To reduce the number of mails, we were asked to make all report in one mail. We modified the script where it sends mail to user after all report generates, zip it and send it.

But still user is not satisfied as they want to have only one excel/csv file which has different tabs. ( one report info into one tab..). Now there should be only one csv/excel file which has 7 table contaiing different information.

I know it is not possible to do it through unix shell script. If any one knows on how to achive this, please post your suggestions.

I am thinking of doing it through combination of Shell script and Java script as java has functionality to create excel file with more than one tab. If any one of you have done it before by either combo of shell/java or by different approach, please help me.

The only show stopper is, it should be done by shell script.

Probably Perl if you have it. Here's the module:

John McNamara / Spreadsheet-WriteExcel - search.cpan.org

Thanks turk451,

WHile running one of the sample code, i am facing the below error.

Can't locate Spreadsheet/WriteExcel.pm in @INC

you need to install this module (WriteExcel.pm) from the cpan

 
 perl -MCPAN -e 'install "Spreadsheet::WriteExcel"'

Hi Kamaraj,

Can you please guide me how to install it? I am working at client side and i do not want to create any issue after executing the above command.

i need information as where can i execute it? any special folder?

please follow this link

Installation instructions for Spreadsheet::WriteExcel