0

I have 4 mysql queries executed by shell script like ./a.sh > b.xls. So all the data is stored as a single worksheet.

I need to slit this, so that the first 2 queries are stored in the sheet 1 and the other two in sheet 2. Also, in each sheet I would like to have the output of each query side by side, not one by one.

Is it possible to do such thing in shell scripting?

fedorqui
  • 275,237
  • 103
  • 548
  • 598

1 Answers1

1

Best you'd be able to do from Bash is CSV output, which means you can't have multiple worksheets. Alternatively, use Perl, Python or PHP, which do have supporting libraries for XLS output.

See also Writing to an excel sheet using Bash

Community
  • 1
  • 1
Paul Dixon
  • 295,876
  • 54
  • 310
  • 348