Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hei,
I manage to load information from all excel files in folder by using this script:
SUB DoDir(Root)
FOR each File in filelist( Root & '\*.xls')
LOAD @1,
@2
FROM
[$(File)]
(biff, no labels, table is Sheet1$);
NEXT File
FOR each Dir in Dirlist (Root&'\*')
CALL DoDir(Dir)
NEXT Dir
END SUB
CALL DoDir('C:\Users\Mindaugasb\Desktop\Orders\2016')
Now how should I change the script to load information from different sheets in the files?
Thank you!
See this example: Re: Loading Multiple Excel Files and Multiple Excel sheets
See this example: Re: Loading Multiple Excel Files and Multiple Excel sheets
Hi Gysbert,
How do I modify the code you provided in the link when I have no connection nor SQL installed? I tried using the same code and disabling the line about SQL. It loads all .xlsx files with the proper filename but the sheetname cannot be extracted. Thanks!
You don't need to install an SQL database management system. But you do need the odbc driver for excel files. The sqltables command is passed to and execute by the odbc driver to get the list of sheetnames from the excel file.