Multiple excel files processing on unix

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Multiple excel files processing on unix
# 1  
Old 02-26-2009
Multiple excel files processing on unix

Hi all,

I am faced with a rather unusual problem regarding interaction between NT and UNIX. I am using an ETL (Extract-Transform-Load) tool on unix that has the capability to read .xls files. So, when I FTP an excel (.xls) file from a windows server to unix and attempt to read it with this tool, it works. But, my project requirements state that there might be multiple files to be processed together. I tried to cat multiple xls files into a single xls file on unix and tried to read it using the tool, but it does not work; probably because unix does not recognize this format. So, my problem is, I am not able to merge multiple excel files into a single readable file on unix.

I have a feeling this cannot be done. But I wanted the experienced folks on this forum to confirm the same. I would greatly appreciate any assistance I can receive on this. If any part of my question is not clear, please let me know and I ll explain.

# 2  
Old 02-26-2009
If the tool you have is the only way you can process Excel files from your working environment, then it seems like it's not possible to concat them, since they're in binary format, and concatenating them will make the file either unusable to the ETL tool, or it will only read the first file and stop at the first end-of-file indicator.

However, is there any chance that you can get at the output of your ETL app, and concatenate the output of the three files before they're moved on to the next step?

If you can somehow get the XLS files converted to CSV and combine them before processing then you might be able to pull it off -- I'm sure your ETL tool can process a CSV file as an Excel spreadsheet if it can read the XLS format. There are Unix tools that can read XLS and export them as comma-delimited or tab-delimited files, such as the abtab (abstract table) utilities. I used them for two years at my old job.

abtab - Google Code (I don't know how up-to-date the Google Code files are compared to the in-house version I was using, but it should work.)
# 3  
Old 02-26-2009
ShawnMilo - Many thanks..!

The tool requires a filename to be specified. So, I was attempting to merge all files into one and process it. Processing them separately may not be possible because the number of input files will vary each time.

That being said, the only way that remains is to somehow convert it into a csv. As you rightly said, this will definitely work with my tool. Do you know of a unix tool that can convert an xls file on unix to csv? Or should I convert it at the source NT server? Can you please guide me on this.

Thank you.
# 4  
Old 02-26-2009
Yes -- the abtab utilities I linked to above. The abtab_cat utility should allow you to pass parameters identifying the input as XLS and the output as CSV (or at least tab-delimited, which is easy enough to convert).

The syntax will be something like the following (untested):

abtab_cat --in xls://filename.xls --out tab://

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Processing multiple files (environment setting)

Hello I posted on here a while ago about processing multiple files within a script. See original post below: I have a program cfxfrwb which is designed to remove headers from reports files. The cfxfrwb is located in the following directory /u01/efin/v40/live/bin I run the program against... (8 Replies)
Discussion started by: captainrhodes
8 Replies

2. Shell Programming and Scripting

Processing multiple files

Hello I have a program cfxfrwb which is designed to remove headers from reports files. The cfxfrwb is located in the following directory /u01/efin/v40/live/bin I run the program against a single report file in the temp directory and it does it's job../cfxfrwb... (2 Replies)
Discussion started by: captainrhodes
2 Replies

3. Shell Programming and Scripting

Write two csv files into one excel with multiple sheets

I have requirement to write two CSV files to one single excel with multiple sheets. Data present in the two files should sit in excel as different sheets. How can we achieve this using shell script? 1.csv 2. csv 1,2,3,4 5,6,7,8 XXXXX YYYYY Res.excel 1.csv data... (1 Reply)
Discussion started by: duplicate
1 Replies

4. Shell Programming and Scripting

Processing multiple files awk

hai i need my single awk script to act on 4 trace files of ns2 and to calculate througput and it should print result from each trace file in a single trace file. i tried with the following code but it doesnt work awk -f awkscript inputfile1 inputfile2 inputfile3 inputfile4>outputfile ... (4 Replies)
Discussion started by: sarathyy
4 Replies

5. Shell Programming and Scripting

create separate files from one excel file with multiple sheets

Hi, I have one requirement, create separate files (".csv") from one excel file(xlsx) with multiple sheets. These ".csv" files are my source files. So anybody please suggest me the process. Thanks in Advance. Regards, Harris (3 Replies)
Discussion started by: harris
3 Replies

6. Shell Programming and Scripting

multiple groups of files processing

I have five directories, dir1 to dir5 for each directory, I have all same number-named folders. There are four types of folders, {1..10}, {20..30}, { 40..50}, {60..70} Now for each types of folder, I will do the same thing, here is the code for i in {1..5} do cd dir$i mkdir temp1 for... (5 Replies)
Discussion started by: ksgreen
5 Replies

7. UNIX for Dummies Questions & Answers

single output of awk script processing multiple files

Helllo UNIX Forum :) Since I am posting on this board, yes, I am new to UNIX! I read a copy of "UNIX made easy" from 1990, which felt like a making a "computer-science time jump" backwards ;) So, basically I have some sort of understanding what the basic concept is. Problem Description:... (6 Replies)
Discussion started by: Kasimir
6 Replies

8. Shell Programming and Scripting

Add multiple .csv files as sheets to an excel file in unix.

Hi, I am using Solaris 8. My script outputs 4 .csv files. Currently I am SFTPing the files and creating a new excel file with the 4 files as sheets. Can anyone suggest ways to do this in UNIX ? Thanks, David. (2 Replies)
Discussion started by: libin4u2000
2 Replies

9. Shell Programming and Scripting

Processing Multiple Files

Hello Everyone, I am new to scripting and confused with how to do this efficiently. I am trying to use AWK to do this. I have a lot of files in a folder which has the data of my throughput measurements in two columns i.e. Serial # and Throughput. like this 177.994 847.9 178.996 ... (1 Reply)
Discussion started by: hakim
1 Replies

10. Shell Programming and Scripting

Multiple excel work sheets through UNIX

Hi, There is this requirement to create multiple work sheets in an MS Excel file through UNIX. We normally can create one work sheet in unix by either tab or comma delimiting and appending .xls or .csv to the file name, but can we create multiple work sheets. Regards, Puspendu (1 Reply)
Discussion started by: puspendu
1 Replies
Login or Register to Ask a Question

Featured Tech Videos