Excel via ODBC returning null/nothing for SOME numeric fields

QuickBooksDev2

New Member
Joined
Dec 30, 2013
Messages
4
We have a VB.Net (201) program that uses Excel (2013) via a ODBC connection string.

We have found that we get a value of null (or Nothing in VB) for SOME NUMERIC fields but not all. Changing the Excel cell format does not help. Putting in a single quotes '6000 does work (this makes it a string vs a number). This occurs on our development machine and on our client's machine. (Windows 7)

Have tried small numbers i.e. 2 or 3 and large ones i.e. 1235678 but only the single quote works.

It would be quite a big deal to change it to Interop.Excel, etc.

Any advice?

Happy New Year!
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
What's the connection string? Are you using IMEX=1 which can help with columns that contain mixed data types.
 
Upvote 0
Not using IMEX. Does not let me. Get Could not find installable ISAM

Here is string
provider=Microsoft.Jet.OLEDB.4.0;Data Source='......xls';Extended Properties=Excel 8.0;

Is there a better one?
 
Upvote 0
I upgraded the connection string to
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myExcel2007file.xlsx;
Extended Properties="Excel 12.0 Xml;HDR=YES"

and it seems to work.

Thanks for pointing me in that direction.
 
Upvote 0
For the original one you would have used something like:
Code:
provider=Microsoft.Jet.OLEDB.4.0;Data Source='......xls';Extended Properties='Excel 8.0;IMEX=1;HDR=YES'
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

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