importing SOME columns of Excel file

K

Kostas

I want to import SOME columns of Excel file (i.e. Sheet1!a1:a100;Sheet1!c1:c100;Sheet1!e1:e100 ) to Access table with the some number of columns (i.e. three). I try to do it with DoCmd.TransferSpreadsheet like this:

XLSheet = "Sheet1!a1:a100;Sheet1!c1:c100;Sheet1!e1:e100"
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, _
"ImportTable", XLFile, False, XLSheet

But it doesn't work(I get error message). Any suggestions;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top