Spire.DataExport for .NET is a 100% pure data .NET library suit for exporting data into MS Word, Excel, RTF, Access, PDF, XPS, HTML, XML, Text, CSV, DBF, SYLK, SQL Script, DIF, Clipboard, etc.

Tue Jun 03, 2008 9:31 am

I export file using .XLS option. (I am using Spire.DataExport in my ASP.NET 2.0 App.)

Get the following error;
1. Unable to read the file.
2. "Errors were detected in 'Stream1.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??
Also, this problem does not occur in my local machine ; It occurs on all other production servers(Local server & Live SERVER)
Regards

contactkx
 
Posts: 3
Joined: Mon Jun 02, 2008 7:34 am

Return to Spire.DataExport