EasyXLS
http://forum.easyxls.com/

Reading worksheet as Dataset
http://forum.easyxls.com/viewtopic.php?f=9&t=324
Page 1 of 1

Author:  bhav27 [ Tue Apr 29, 2008 8:53 am ]
Post subject:  Reading worksheet as Dataset

One thing we have noticed in our trial version testing. While reading excel worksheet as dataset if the worksheet has columns with formula then EasyXLS brings back #VALUE! into dataset.

I can see correct values appearing in the formula columns but still EasyXLS through “Error processing formula: any formula text, Unable to cast object of type System.String to type EasyXLS.Formulas.Util.FunctionDataObject”

This error occurs when following lines of code executes:
Code:
ExcelWorksheet xlsWorkSheet = (ExcelWorksheet)xls.easy_getSheet(workSheetName);

DataSet tempDS = xls.easy_ReadExcelWorksheet_AsDataSet(xlsWorkSheet);



Please advice why do we get #VALUE !even though we have correct formula value e.g. value 12 appearing in the formula column.


Cheers
Bhavesh

Author:  how [ Fri Jun 13, 2008 3:33 am ]
Post subject: 

Hi
I also have the same problem
I found that if one of the cell value is a number with some space character,it will return that error.
for example:
A1 = A2+A3+A4
if A3's real value is " 123"
when I ReadExcelWorksheet_AsDataSet
the A1 cell will be #VALUE !
but in Office2003 ,the A1 can still do the calculation correctly
it's not easy to find out.
I hope EasyXLS can fix this quickly

Page 1 of 1 All times are UTC - 4 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/