ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Problem reading with Percentage values (https://www.excelbanter.com/excel-programming/436564-problem-reading-percentage-values.html)

Problem reading with Percentage values

Problem reading with Percentage values
 
Hi,

I am using OleDB provider to read excel file. I am facing the
problem when reading percentage values from some excel sheets (very rarely).
Suppose a cell has 42.3%, when reading the value it comes like 0.423... but
while reading other Workbook's excel sheets (for those actual value is
24.7%), it reads properly like 24.7.... When i checked excel sheet cell
Format for both Workbooks, it is same with Percentage with 1 decimal.

Connection String i am using to read excel sheet is


Provider=Microsoft.ACE.OLEDB.12.0; Data Source='"

+ strFilePath.Replace("'", "''") + "';Extended Properties=Excel 12.0;



where strFilePath provides the path to excel document.


Thanks
Anil


All times are GMT +1. The time now is 09:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com