TransferSpreadsheet question

K

Ken Warthen

I'm using the TransferSpreadsheet method to import an Excel spreadsheet into
an Access 2007 table. I've set the SpreadsheetType parameter to
acSpreadsheetTypeExcel9. This works when the spreadsheet is a .xls file, but
the spreadsheet I'm importing is a .xlsm file. To make the code work I open
the .xlsm file in Excel and then do a SaveAs where I can change the file type
to .xls. This is not really an acceptable solution for end users of the
application. Is there a way to import spreadsheets in the .xlsm format?

Ken
 
D

Dirk Goldgar

Ken Warthen said:
I'm using the TransferSpreadsheet method to import an Excel spreadsheet
into
an Access 2007 table. I've set the SpreadsheetType parameter to
acSpreadsheetTypeExcel9. This works when the spreadsheet is a .xls file,
but
the spreadsheet I'm importing is a .xlsm file. To make the code work I
open
the .xlsm file in Excel and then do a SaveAs where I can change the file
type
to .xls. This is not really an acceptable solution for end users of the
application. Is there a way to import spreadsheets in the .xlsm format?


Try acSpreadsheetTypeExcel12 for the SpreadsheetType. If that isn't
defined, use the numeric value 9.
 

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