Transferspreadsheet to import excel file with different column

  • Thread starter Thread starter samhck2
  • Start date Start date
S

samhck2

Hi All,

I need to import an excel file with different columns, ie: A3:B, D3:E
and G3,J. I don't need column C and F.
I am using code below but it doesn't work. Can anyone help??

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, _
"CMSTbl", xlPath, True, "A3:B, D3:E, G3:J"

regards,
Sam
 
Why not try this?

Import the exel into a temp table with all of the columns and write an
append query to move just the columns you need into your permanent table/
 
George,

But, my data import is a lot and perform daily. If create another temp
table, it will increase the database sizes, which I don't want that.
Any other ideas beside import into temp table?

Thanks for your suggestion. Appreciate it.
 

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

Back
Top