DoCmd.TransferSpreadsheet and referencing an Excel range

P

pmartin1960

Hi guys

I am using DoCmd.TransferSpreadsheet to import a dynamic range from an
Excel table into an Access table. The Excel data may have no data or
any number of rows. I have found that TransferSpreadsheet requires the
range to be defined, otherwise empty rows are imported (I'm assuming it
imports the UsedRange, whether data exists or not).

Do I need to open the Excel Workbook in order to reference the range?

Thanks in advance

Paul Martin
Melbourne, Australia
 
T

tina

if you have a column in the worksheet that is *never* blank, in valid
records, then try opening the "receiving" Access table in design view, and
setting a validation rule on the corresponding field, as

Is Not Null

hth
 

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