We currently output our data to a Grid and then export to XLSX, however we are experiencing a unique problem with one of the records. The record in question returns the word "Infinity" and it causes a problem with opening the Excel document. We receive the following error message:
"Excel found unreadable content in '....aspx'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes."
Clicking Yes will repair the worksheet.
After doing much testing to narrow down what record it is failing on, we have concluded it is failing on this record with the word "Infinity". If I change the database record to "Infinity CU", there is no problems and the Excel file will open properly. If I save the Excel document after all these messages, it will save properly and once reopened it will be successful. CUName is the field that it fails on.
I am including the code that displays the grid but might you offer a suggestion on how to remedy this problem?
<
telerik:RadGrid
ID
=
"_grdInvisibleGridForExcel"
runat
=
"server"
Visible
=
"false"
HeaderStyle-Font-Bold
=
"true"
HeaderStyle-BackColor
=
"#4F9A25"
HeaderStyle-ForeColor
=
"White"
CellSpacing
=
"-1"
GridLines
=
"Both"
GroupPanelPosition
=
"Top"
AutoGenerateColumns
=
"false"
ExportSettings-Excel-Format
=
"ExcelML"
>
<
MasterTableView
>
<
Columns
>
<
telerik:GridDateTimeColumn
DataField
=
"Financial Date"
HeaderText
=
"Financial Date"
UniqueName
=
"FinancialDate"
FilterControlAltText
=
"Filter FinancialDate column"
></
telerik:GridDateTimeColumn
>
<
telerik:GridBoundColumn
DataField
=
"charter_Num"
HeaderText
=
"Charter #"
UniqueName
=
"CharterNum"
FilterControlAltText
=
"Filter CharterNum column"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"asi_Num"
HeaderText
=
"ASI #"
UniqueName
=
"AsiNum"
FilterControlAltText
=
"Filter AsiNum column"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"cuName"
HeaderText
=
"CU Name"
UniqueName
=
"cuName"
FilterControlAltText
=
"Filter cuName column"
></
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>