Have to open and save excel File in order for access to import

Jarobe86

New Member
Joined
Mar 27, 2012
Messages
3
Hey guys I think I may have a tough question

So I query data from our SQL db with sap business objects infoview and it spits out an excel file. I have aN access db with a macro that pulls the excel data into a table with docmd transfer spreadsheet. (used macro builder.)

The problem is: It will leave the last column blank in the access table unless I manually (or use vb) open and save the excel file before i run the access macro.


We have had 5 people scratching our heads with this one.

Things we verified/tried

The range was left blank
adding a dummy column (works until someone opens the excel file)

Maybe something to do with versions of excel? We figure something must be happening behind the scenes when we resale that allows the macro to work.

Thanks to anyone who might be able to help!!!!
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Sandeep Warrier

Board Regularmmmm Pizza
Joined
Oct 31, 2008
Messages
2,672
Hi & welcome to the Board!

It might help if you post the code that is used to import the Excel workbook, and also a sample of the data in the spread-sheet.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,123
Messages
5,570,315
Members
412,318
Latest member
angoeyuan
Top