I am starting with the Telerik Document processing libraries. I have a simple excel file that I would like to import into a list to work with in my program.
I have an imported workbook and worksheet that seems to work. When I try to get the data from a test cell however:
string test; test = sheet.Cells[0,0].GetValue().ToString();
instead of returning the value I put in the cell I get:
"Telerik.Windows.Documents.Spreadsheet.Model.RangePropertyValue`1[Telerik.Windows.Documents.Spreadsheet.Model.ICellValue]"
I have been reading the documentation and can't figure out what I am doing wrong.
(for the record:
test = sheet.Cells[0,0].GetValue().Value.ToString(); returns
"Telerik.Windows.Documents.Spreadsheet.Model.NumberCellValue"
so it isn't helpful either.)
I figured out a method of getting the data that I need:
Hey, Steven,
I'd be glad to help out here.
The method you've used is the fastest way to get a cell's value. I agree that, at first look, it seems more complicated than one might expect, compared to getting a cell value in Excel. This is due to how a spreadsheet's cells' values are maintained "under the hood". Without getting into excess detail, our API maintains high performance and allows for granular control over a spreadsheet's elements, but at times adds a bit more complexity when it comes to simpler tasks, such as this one.
Regards,I recommend checking this post in our forum, which lists two more ways of getting cell values - Just get the value of a cell. It goes into some useful detail regarding formulas, cell value types, and cell formats. I believe it proves most useful when starting out with RadSpreadProcessing. Please do reach out again should you have any other questions. I remain at your disposal.
Svilen
Progress Telerik