Access Links to too many rows in Excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've started on another database and I'm linking to an Excel spreadsheet
instead of importing it. (Learn something new, try something new.) Including
the header row, there are 209 rows and 37 columns in spreadsheet. When I
link, Access show 3,896 rows and 100 columns. I named the data range in Excel
and tried a second time and got the same result. Am I missing something
simple?
Thanks!
 
Here is one I use in my database. Notice the range argument syntax. This
imports columns D through AI. I only get as many rows as there are with data
in them in the spreadsheet. Have you checked to see if there is any data you
don't know about in other parts of the sheet?

DoCmd.TransferSpreadsheet acLink, 8, "xlActuals", _
strXlFileName, True, "Actual_res_export!D:AI"
 
Don't know if this will fix your problem but...

Within Excel, do a Ctrl+End on the sheet to see where Excel thinks the
"end-of-data" is. Delete any extraneous rows & columns. Be sure to use the
delete command, not the delete key which only clears contents. Save the
file, reopen & do Ctrl+End again to be sure the end-of-data is where you
expect it to be.

Then try linking again.

HTH,
 
Back
Top