To Detrive data from Db in .xls format

February 28, 2013 at 00:30:02
Specs: Windows 7
On Daily basis I am retrieving data from DB and preparing a report.
I am using aqua data studio and bash shell in unix.
I need a unix script to automate this task. I have a script which gives me the log file as a output. But I need either CSV or .xls file as the output.

See More: To Detrive data from Db in .xls format

Report •

#1
March 1, 2013 at 10:29:14
Creating CSV files in unix shouldn't be hard. This link describes how to do it with shell and perl:

http://www.unix.com/shell-programmi...

Creating an Excel file directly is more difficult. It requires a compiled or scripting language with the proper Excel library. Perl provides the Spreadsheet::WriteExcel library available from cpan.org:

http://search.cpan.org/dist/Spreads...

It should work on any platform that has Perl installed.

Google should provide you many examples of creating CSV files and Excel files.

Let me know if you have any specific questions.


Report •

#2
March 1, 2013 at 23:22:09
The output which i get when i run my query has four columns the first column output is specialcharacters and numbers. For Eg: it looks simillar to the below table.

ID TYPE Status record
994-84858-00B Company(pre) Executing 1
95896-2388-0 post(pre) pending 0

when i run my script it gives me o/p of the form :
994-84858-00B Company(pre) Executing 1 95896-2388-0 post(pre) pending 0

I need my o/p in the csv format.




Report •
Related Solutions


Ask Question