I have about 100 xlsx files, all with 1-7 sheets each. Each file and sheet has the same columns as the table I want to import everything into.
I can use this successfully:
SELECT *
FROM OPENROWSET(
'Microsoft.ACE.OLEDB.12.0',
'Excel 12.0;Database=C:\0.xlsx',
'SELECT * FROM [sheet1$]'
)
or
SELECT * FROM OPENDATASOURCE( 'Microsoft.ACE.OLEDB.12.0', 'Data Source="C:\0.xlsx";
Extended properties=Excel 8.0')...Sheet1$
But how can I import multiple sheets from a file?