View Single Post
 
Old 11-18-2023, 09:49 AM
gmaxey gmaxey is offline Windows 10 Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,378
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default ADODB connection string to retrieve actual values

I have an Excel file that contains columns with mixed data formats (i.e., the first row heading is text, the remaining values are percentage, the first row heading is text the remaining rows are currency etc.


I am trying to retrieve these values as their actual displayed percentage, currency values via an ADODB connection:



strConn = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=" & dbPath & ";" & _
"Extended Properties=""Excel 12.0 Xml;HDR=YES;IMEX=1"";"



But it isn't working. I am getting their text equivalents e.g, $12.00 is returned as 12
5.00% is returned as .05


Is there a way to get the actual values from the Excel record fields? Thanks


Cross posted at: ADODB Get actual displayed values
Attached Images
File Type: png Sample Data.png (19.7 KB, 13 views)
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote