Read percentage cells

31 views
Skip to first unread message

AV

unread,
Apr 28, 2013, 10:23:33 AM4/28/13
to csv...@googlegroups.com
Hi,
I faced the issue when I read XLS files include cells formated as "Percentage".
In a file I have values like: 5%, 10%, 0%
But when I access to the cells from SpreadsheetReader I see values like: 0.05, 0.1, 0 instead.
How I can see from SpreadsheetReader the original values or something like: 5, 10, 0?
Do I have a way to see a cell's format to make my own conversions on the cell's value?

shriop

unread,
Apr 28, 2013, 12:09:14 PM4/28/13
to csv...@googlegroups.com
The original values are .05, .1, 0, etc. You have to remember that 10% is 0.1, i.e. 1/10. No, there's currently no way to access the formatting directly or access the value as it has been formatted using SpreadsheetReader. My focus with these objects was to be able to access data, not values for display purposes. The values are stored internally inside the spreadsheet as 0.1, with a separate formatting mask, but the mask is probably more complicated than you would expect.

Bruce Dunwiddie

AV

unread,
Apr 28, 2013, 1:11:16 PM4/28/13
to csv...@googlegroups.com
Thanks, got it. Very bad for me.
Reply all
Reply to author
Forward
0 new messages