Hi,
After upgrading Telerik in a project I haven't visisted in the last 6-8 months, my Document Processing references are suddenly broken in the code.
The references in Nuget seems to be doing fine, but in the class where I build my Document Processing I am suddenly getting a ton of errors with for example; Workbook, CellIndex(), CellBorder, IWorkbookFormatProvider, ImageSource(), FloatingImage, RadHorizontalAlignment, ColumnSelection to name a few.
Do you have any experience with these sudden problems after upgrading? I upgraded via Nuget Package Manager.
Maybe I am missing something, but it it very frustrating when it has been working without problems before upgrading.
Kind regards,
Kirstine
Hi,
I am using the SpreadsheetProcessing library to import Excel files for reading data. I am sure there are other libs to use as well but as a long-time Telerik customer this was a very easy and neat way for me to import xlsx files without the need for any interops. Worked like a charm until i got a source file that contains Threaded Comments (Office365) which throws an exception on import.
I see that working with Threaded Comments are currently in development for 2022 R2 but is there a way to "ignore" them so not to throw an exception in import. I am not interested in the comments.
Thanks
using the tutorial on:
I have this code:
Workbook workbook; IWorkbookFormatProvider formatProvider = new Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsm.XlsmFormatProvider(); using (Stream input = new FileStream(FileName, FileMode.Open)) { workbook = formatProvider.Import(input); }
when trying to open the file I get the following error:
Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
I have not done anything to the file other than attempt to open the file. Some files can be opened, but many throw this error. I cannot determine what the problem is and can't figure out what the 'index' is that's being referred to.
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 would like to format a range of cells in an Excel Worksheet that are already part of a named range. How is it possible to format this table in the Excel worksheet with banded rows? I want it just like Excel does it for a table formatting.
Is this banding of rows possible with the present Telerik SpreadProcessing library?
Hi
Is there a way to get the un rounded .Net double value of a formula cell?
Instead of using the GetResultValueAsString method used in the examples:
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();
worksheet.Cells[0, 0].SetValue("=SUM(A2, 3)");
worksheet.Cells[1, 0].SetValue(10);
ICellValue cellValue = worksheet.Cells[0, 0].GetValue().Value;
CellValueFormat format = worksheet.Cells[0, 0].GetFormat().Value;
string valueAsString = cellValue.GetValueAsString(format); // =SUM(A2, 3)
string resultValue = cellValue.GetResultValueAsString(format); // 13
Hi,
Which is the better way of getting the 'as displayed' cell value?
Dim selection As CellSelection = worksheet.Cells(i, j) Dim value As ICellValue = selection.GetValue().Value Dim format As CellValueFormat = selection.GetFormat().Value Dim formatResult As CellValueFormatResult = format.GetFormatResult(value) Dim result As String result = value.GetResultValueAsString(format) 'vs. result = formatResult.VisibleInfosText
Thanks,
Sid