ADO connection to Excel

AlexanderBB

Well-known Member
Joined
Jul 1, 2009
Messages
2,040
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Yikes ! I've just found my ADO connection in Access is not getting all the data. Some fields are blank. After a bit of googling it looks like I might need a Schema.ini File.

Has anyone any knowledge of this? Or had a similar issue and fixed it. I have made a mockup demo of just the problem. It's the same in Access 97 and 2003.

I have added dummy text to Excels first 8 rows to 'lock' the datatype. The problen doesn't occur until line 58 when a column contains just a dash. Maybe a clue ?

Thanks, ABB
 
Perhaps I better keep quiet... sorry... confusing TypeGuessRows with MaxScansRows.
 
Upvote 0

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Upvote 0
I'll bet you a million dollars it does affect the way the JET engine reads excel files. The article you're reffering to, says that passing the regkey in the extended properties string will not work. But setting the reg key in the registry will absolutly change the way the data is interpreted.

Cool... if you have the time would you do some tests and let us know?
 
Upvote 0
:oops: ****, now I misread my own post, and made the same mistake as ABB.
It should be TypeGuessRows.

So give me you're accountnumber and I'll transfer the money as soon as possible :biggrin:.
 
Upvote 0
lol... buy me a pint when you're next in London and we'll call it quits. :)
 
Upvote 0
Assuming that the import is the same each time, I would create and save an import specification manually for each of your CSV files, then specify the name of the saved specification as the second argument of the TransferText method.
 
Upvote 0
Rorya, that's something I'll have to swot up on, thanks for the tip but also very intrigued with the transferSpreadsheet method Colin mentioned.

So many ways ...... the best may well be another eureka moment, like when I stumbled onto .CopyFromRecordset. It was great to bin a pile of poor code and have amost 1000% speed increase. :)
 
Upvote 0

Forum statistics

Threads
1,223,098
Messages
6,170,100
Members
452,301
Latest member
QualityAssurance

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top