I export file using the Spire.XLS in my ASP.NET 2.0 WEB App.
Get the following error;
1. Unable to read the file.
2. "Errors were detected in 'Stream.xls,' but Microsoft Excel
was able to open the file by making the repairs listed below. Save
the file to make these repairs permanent.
Damage to the file was so extensive that repairs were not possible. Excel attempted to recover your formulas and values, but some data may have lost or corrupted."
This happens only when the file to be exported contains following data-
"DFAFTAFAFAATTAFTDDDDFTAAFFTAAAFDDADTDATDFDAAAFFDDTDTDFFTADTTDFTFF"
"AATAFDFATDDTTTTDTAFTATTTDAAFTADFDTFFDADFDATTFTFATTATDTTDFFDAFAFFD"
This is a 65 character string obtained after encoding using a 3rd party interop library.This field is then stored in database table and the export calls this file's data from database
I Have used the following code to export-
Dim dtExportTemp As DataTable = GetExportData()
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader("content-disposition", "attachment; filename=Stream.xls")
Me.ExcelCellExport1 = New Spire.DataExport.XLS.CellExport
ExcelCellExport1.Register("User1", "password1")
ExcelCellExport1.DataSource = Spire.DataExport.Common.ExportSource.DataTable
ExcelCellExport1.DataTable = dtExportTemp
Response.Buffer = True
ExcelCellExport1.SaveToHttpResponse("Stream.xls", Response)
Can anyone please guide me??
Regards