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 :(


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):

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.)

  • 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
    Commented Aug 12, 2012 at 18:47
  • 1
    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_
    Commented Aug 13, 2012 at 7:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .