CSV file decimal value issue

I have a csv file with multiple columns. Some columns have numeric data with decimal having 2 to 10 decimal accuracy. When reading this file from ADODB record using VBA some column decimal values are getting picked correct but for some its only taking number (without decimal).

Example: Column 1 value = 26.0123456789 (value can vary) Column 2 value = 26.0123456789 (value can vary)

In the record object the value for column 1 is coming as 26.0123456789 but for column 2 is coming as 26

Using connection string as: con.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Directory_Path & ";" & "Extended Properties=""Text;FMT=Delimited(,)"";"

edit delete
are you sure?
asked Parag Barjatiya

2 answers

Have you tried putting a schema.ini file in the folder.

It can contain specifications about your data.


MaxScanRows with value 0 in this case would cause the datatype guessing to scan all rows in the file.

edit delete
are you sure?
answered John Hancker

Hi John

Thanks for the reply. Yes I tried that yesterday and it worked like a charm. I went busy with other stuff so could not update here.

Thanks a lot for replying.

edit delete
are you sure?
answered Parag Barjatiya

Post an answer but please login first

Post Answer
  1. Please login to post answer

Similar Questions

Tagsfor this question

Forumall questions

This page is the archive of this page:https://www.connectionstrings.com/questions/49185/csv-file-decimal-value-issue/, the copyright belongs to the original page!
aspxhtmlmobile0898kendouidemosaspxhtml docs