automating Import Table

  • Thread starter Thread starter John T Ingato
  • Start date Start date
J

John T Ingato

Every week, I import a spreadsheet of new transactions into a specific
table.

I click tables / select import table / find the spreadsheet / select the
table for importing into and do it.

what would the code be for importing this spreadsheet say "C:\mysheet.xls"
into "tblSalesData"
 
John said:
what would the code be for importing this spreadsheet say "C:\mysheet.xls"
into "tblSalesData"

INSERT INTO tblSalesData
SELECT *
FROM [Excel 8.0;HDR=Yes;DATABASE=C:\mysheet.xls;].[Sheet1$];

Use HDR=No if there aren't any column headers in the worksheet. Replace
Sheet1 with the name of your worksheet.
 
Back
Top