Parse Excel file using and import into MS Access

179 Views Asked by At

I am new to shell script so i don't any idea about this, please help me in this. In my scenario i have some excel files generated from mainframe which will update daily basis. my work is to write a code using shell scripting and parse the file and import some of the column into the MS Access database. How to do this?

Any help will be appreciate.

I am suppose to do using shell script but as this is new project i can use any other scripting to write the code and make the batch file so if any other way is best suited for this then please help me.

2

There are 2 best solutions below

1
On

You could use something like awk command like this: awk -F : (or whatever the excel file uses as a field separator) '{print $1, $2...}'. Once you have the field separator correct you use the '{print}' section to print the fields of the file that you want. After you've saved the file it should be ready for import into the database.

awk -F: '{print $1, $2}' /tmp/excel-file >/tmp/sorted

0
On

See this page: https://mauriceausum.com/2015/07/12/automate-your-import-process-in-access/

it's from 2015 but the steps should be similar enough. No need for a shell script!