Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Could you please help me for the below concerns.

  1. I'll be executing one script which gives some output
  2. Have to arrange them in a table format in excel
  3. Attach the excel and send it through mail

Anyone please suggest idea for automating the above steps. I can do 1st and 3rd step but i've no idea regarding the second step :(

share|improve this question
    
@Gilles.. Can you pls help on this topic, pls guide me since i'm a newbie unix.stackexchange.com/questions/45322/… –  Maniv Aug 12 '12 at 19:02
add comment

1 Answer 1

I take it you've got some values and you want to create a file that Excel can read. The easiest-to-create file format Excel understands probably is CSV, comma-separated values, i.e. a plain text file like this example (from Wikipedia):

Year,Make,Model,Description,Price
1997,Ford,E350,"ac, abs, moon",3000.00
1999,Chevy,"Venture ""Extended Edition""","",4900.00
1999,Chevy,"Venture ""Extended Edition, Very Large""","",5000.00
1996,Jeep,Grand Cherokee,"MUST SELL!
air, moon roof, loaded",4799.00

Now, there are several ways to create CSV files. In very simple cases, sed or awk might do; however, there're many tools/libraries designed for this task, the answers here (SO) mention a few. (The CRUSH (Custom Reporting Utilities for SHell) tools mentioned there might be interesting for step 1., too.)

share|improve this answer
    
But in csv files we cannot create tables right !! So can you suggest any alternative in which i can create table and fill values automatically? –  Maniv Aug 12 '12 at 18:47
    
I'm not sure about this. Just try it, save some Excel-work as CSV and examine it... If you want to create something too fancy, there might be better methods, e.g. using Python or something like DataNitro (formerly called IronSpread). –  sr_ Aug 13 '12 at 7:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.