• Post Reply Bookmark Topic Watch Topic
  • New Topic

CSV file with multiple tabs  RSS feed

 
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using Shell/Perl/C/SQL I create a CSV file which is then sent as an email attachment with uuencode (from Unix SunOS).

I need to send another (spreadsheet) file but would like that to be as a second tab in the above spreadsheet and not a second file.

Any thoughts on how to combine two CSV files as one spreadsheet?

Thanks in advance,

Leslie
[ November 24, 2004: Message edited by: Leslie Chaim ]
 
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The idea of csv-files is a portable, text-only, plattform and application-independent format.

Tabs in a spreadsheet are handled differently for OpenOffice, KCalc, Excel and other applications.

A flat file cannot specify a second tab.
 
Leslie Chaim
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Understood and makes sense.

So then let me ask specifcally for Excel:



Does such a tool or idea exist?
 
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use http://jakarta.apache.org/poi/ to generate
xls directly with java. Other possibility would be to
write a macro in excel to do that.

BTW your question is not Unix or Linux related.

Best regards,
Petr
 
Leslie Chaim
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PB: BTW your question is not Unix or Linux related.

Not so sure... :roll:

I talked about 'tools', 'uuencode' and my entire job runs on Unix, I also asked 'that I was looking for tool to be used in Unix'... I think it's at least related to Unix. Otherwise, please suggest which forum you'd pick for that?

BTW, your answer has nothing to do with Unix Nevertheless, it's a great solution and I'll use it in the future. Hey, has anyone created such a tool in Java? I am trying to avoid re-inventing the wheel.

Anyway, if I had to write this tool I think I'd resort to my favorite text-processing language: Perl and the Spreadsheet module.
[ November 29, 2004: Message edited by: Leslie Chaim ]
 
Saloon Keeper
Posts: 18800
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's unix-related enough for me. But csv has no support for tabbed spreadsheets - it's nothing more nor less than what its name implies.

So your choices come down to either using your favorite toolset (Java Poi, Perl spreadsheet module or whatever) to generate an actual Excel-format file OR having a Windows client use Automation to suck in each CSV in its turn and place the data on a sheet of its own.

Well. I suppose you could generate XML, fire up OpenOffice and have it export into Excel format, but that's a bit much.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!