I wanted to document an exception I am seeing when using the Excel library to read a specific custom cell format.
If an Excel cell has the following:
Then reading the cell with InfragisticsWorksheetCell.GetText() throws the following exception:System.InvalidOperationException was caughtHResult=-2146233079Message=The cell's format string is invalid. To be notified of this when the FormatString is set, set Workbook.ValidateFormatStrings to True.Source=Infragistics4.Documents.Excel.v18.1StackTrace:at Infragistics.Documents.Excel.WorksheetCellBlock.GetCellTextInternal(Worksheet worksheet, WorksheetRow row, Int32 rowIndex, GetCellTextParameters paramters, Object value)at Infragistics.Documents.Excel.WorksheetCellBlock.GetCellTextInternal(WorksheetRow row, Int32 rowIndex, GetCellTextParameters paramters)at Infragistics.Documents.Excel.WorksheetRow.GetCellTextInternal(WorksheetCellBlock cellBlock, GetCellTextParameters parameters)at Infragistics.Documents.Excel.WorksheetCell.GetText(TextFormatMode textFormatMode)
The following file is a minimal spreadsheet that reproduces the issue with the custom format applied to cell A1:
Thanks for consideration of this issue, and your continued improvements and updates to the Winforms Excel library!
Thank you for posting to our forum!
I am able to reproduce InvalidOperationException when using the Excel library to read a specific custom cell format.
I have submitted this development issue for further investigation (256891) and have created this case a private case where I will link this development issue and also provide you with further information.
Please let me know if I can provide you with further assistance.
Hello Ben ,
Here is you private case number CAS-197693-P2D8N4, you can find it in 'My Support Activity' page.
Please let me know if I can provide you with further assistance on this matter.
Associate Software Developer