This project has moved. For the latest updates, please go here.

Get Value from function error

Jul 21, 2014 at 8:16 AM
Edited Jul 21, 2014 at 8:31 AM
e.g.
Worksheet:sheet1
Value:
ColumnA   ColumnB   ColumnC   ColumnD   ColumnE
  A   |   B     |   A    |  A  |   ( =COUNTIF(A1:D1,"A")  )
And I try get the count of the cell value is "A" by ColumnE forluma.

Then will thorw "System.InvalidCastException"

sourceWorkBook.Worksheet("Sheet1").Cell("E1").Value
But the valuecached is ok.
How can i get the value of columeE row 1? Thanks.

And I put the test file on this siete,
http://www.liuzhiyong2012.cn/dl/Z_Test_Microsoft Excel Worksheet.xlsx