LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-26-2008, 05:38 AM   #1
sumitdevbharadwaj
LQ Newbie
 
Registered: Nov 2008
Posts: 20

Rep: Reputation: 0
Unhappy How to export reports generated in Linux to excel sheets.


Hi All,

I use linux remotely through Putty. Now I wish to write script in which I am supposed to login into various systems, pickup some data and then generate reports daily and those reports to be exported to excel.

Main problem I m facing is how to export my report file to excel?
Can somebody please guide me how I can achieve this. Or you can provide me the links to various docs related to this.

Thanks a lot in advance.

Merry Christmas.

Regards
Sumit Dev Bharadwaj
 
Old 12-26-2008, 06:26 AM   #2
unihiekka
Member
 
Registered: Aug 2005
Distribution: SuSE Linux / Scientific Linux / [K|X]ubuntu
Posts: 273

Rep: Reputation: 32
I guess your reports are not in the excel format (xls) but rather (ASCII) text files generated from console commands?

Hmm, one way would be to create tab delimited files and then import them in excel so that you can then save them in the desired format. There is some software available for conversions to and from *.xls, but they depend on your system and the software installed on them. You might want to search the internet or give some more details about what your report files contain and how they should be exported/converted.
 
Old 12-26-2008, 10:12 AM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Unihiekka is correct: ".csv" (comma- or tab-delimited files) are absolutely the way to go:

http://en.wikipedia.org/wiki/Comma-separated_values

You can easily read and write .csv files from a script.

'Hope that helps .. PSM
 
Old 12-29-2008, 10:58 AM   #4
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,466

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
Hi

If you for some reason cannot use CSV files, or you want coloring or cell formating, you can write Excel files with Perl:

http://search.cpan.org/dist/Spreadsheet-WriteExcel/

You need to install the Perl module first. On Debian/Ubuntu:

sudo apt-get install libspreadsheet-writeexcel-perl

It also installs many nice examples in /usr/share/doc/libspreadsheet-writeexcel-perl/
 
Old 12-29-2008, 11:18 PM   #5
sumitdevbharadwaj
LQ Newbie
 
Registered: Nov 2008
Posts: 20

Original Poster
Rep: Reputation: 0
Hi All,

Thanks a lot. It is surely helping. I'll get back in case I feel further prob.

Bbye and have a Fantastic Year ahead.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can we compare two excel sheets? prakash.akumalla Linux - Newbie 7 10-29-2008 01:48 AM
LXer: 10 must-have Linux (and not only) cheat-sheets LXer Syndicated Linux News 0 08-24-2008 06:00 PM
Emailing Excel sheets from Linux stash1071 Linux - General 10 03-13-2006 12:49 PM
export data to excel or oenoffice.org using Qt pragnya Linux - General 1 01-20-2006 04:55 AM
Export MySQL table into MS Excel spreadsheet dr_sad Programming 1 07-06-2005 12:56 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration