Active Report xlsx Export Generating Exception

  • sharad_77 2 years, 11 months ago

    Hi,

    While doing Excel export (office 2007 Format: xlsx) we are getting Exception. We checkeck with pdf format and we are not getting any error.
    we are attaching a dummy report in RDF format Also we have included the Screen shot.When you export this file into XLSX format you will get following error.

    Exception details:
    System.ArgumentException: ‘.’, hexadecimal value 0×00, is an invalid character.
    at System.Xml.XmlUtf8RawTextWriter.InvalidXmlChar(Int32 ch, Byte* pDst, Boolean entitize)
    at System.Xml.XmlUtf8RawTextWriter.WriteAttributeTextBlock(Char* pSrc, Char* pSrcEnd)
    at System.Xml.XmlUtf8RawTextWriter.WriteString(String text)
    at System.Xml.XmlWellFormedWriter.WriteString(String text)
    at DocumentFormat.OpenXml.OpenXmlElement.WriteAttributesTo(XmlWriter xmlWriter)
    at DocumentFormat.OpenXml.OpenXmlElement.WriteTo(XmlWriter xmlWriter)
    at DocumentFormat.OpenXml.OpenXmlCompositeElement.WriteContentTo(XmlWriter w)
    at DocumentFormat.OpenXml.OpenXmlElement.WriteTo(XmlWriter xmlWriter)
    at DocumentFormat.OpenXml.OpenXmlCompositeElement.WriteContentTo(XmlWriter w)
    at DocumentFormat.OpenXml.OpenXmlPartRootElement.WriteTo(XmlWriter xmlWriter)
    at DocumentFormat.OpenXml.OpenXmlPartRootElement.SaveToPart(OpenXmlPart openXmlPart)
    at DocumentFormat.OpenXml.OpenXmlPartRootElement.Save()
    at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.SavePartContents()
    at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Dispose(Boolean disposing)
    at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Dispose()
    at #tLD.#GOw.#rjx(Stream outputStream)
    at #tLD.#GOw.Export(Workbook workbook, Stream outputStream)
    at GrapeCity.SpreadBuilder.Workbook.Save(Stream outputStream)
    at GrapeCity.ActiveReports.Export.Excel.Section.XlsExport.Export(SectionDocument document, Stream outputStream, String pageRange)
    at GrapeCity.ActiveReports.Viewer.Win.Internal.ViewerApi.Export(IDocumentExportEx filter, Stream stream, String pageRange)
    at GrapeCity.ActiveReports.Viewer.Win.Viewer.Export(IDocumentExportEx filter, Stream stream)
    at GrapeCity.ActiveReports.Win.Export.SectionExport.DoExport(ExportViewer viewer, String fileName)
    at GrapeCity.ActiveReports.Win.Export.ExportForm.btnOK_Click(Object sender, EventArgs e)

    Regards
    sharad kumar

  • 195p
    AbdiasM195p 2 years, 11 months ago

    Hello Sharad,

    Thank you for providing the rdf document. I could reproduce the error at my end as well when exporting to Excel. The issue seems to be related to the data in the report, where the excel parser of the report is failing. I would request you to send across your application and the actual report which was used to create the rdf document along with the data source. It’ll be helpful for me to narrow down the issue.

    Thanks
    Abdias

  • sharad_77 2 years, 11 months ago

    Hello AbdiasM ,

    It is good after lots of R&D we are able to narrow down the issue. I am attaching a sample project.

    Please put Active report DLL (7.2.7895.0) on the folder

    …\Active Report Excel Export Error\ARDLLs\AR7

    In the SQL script Folder. You will find the script which will create the table and insert the data.
    The Excel export problem occurs when CatchetoDisk property on.

    objRpt.Document.CacheToDisk = True
    objRpt.Document.CacheToDiskLocation = strExportPath

    If you comment out the above code, there will not be any problem while exporting to Excel format.

    Since we are generating very large volume report, It is not an option for us to comment catchtodisk property.

    Regards
    Sharad Kumar

  • 195p
    AbdiasM195p 2 years, 11 months ago

    Hello Sharad,

    Thank you for the application. I could reproduce the issue here as well. This issue is fixed in the latest ActiveReports 7 version (7.3.7973.0) which you can download from the following link : http://publicfiles.componentone.com/ActiveReports/ActiveReports%207/ActiveReports%20Developer%20v7.3.7973.0.msi

    Regards
    Abdias

  • -1p
    ShiRuiWei-1p 1 year ago

    Hello AbdiasM ,

    I have similar issue when using ActiveReport 10.0.5602.0. Would you please help with it?

    [ArgumentException: '', hexadecimal value 0x05, is an invalid character.]
    System.Xml.XmlUtf8RawTextWriter.InvalidXmlChar(Int32 ch, Byte* pDst, Boolean entitize) +2452074
    System.Xml.XmlUtf8RawTextWriter.WriteElementTextBlock(Char* pSrc, Char* pSrcEnd) +5501414
    System.Xml.XmlUtf8RawTextWriter.WriteString(String text) +62
    System.Xml.XmlWellFormedWriter.WriteString(String text) +95
    DocumentFormat.OpenXml.OpenXmlLeafTextElement.WriteContentTo(XmlWriter w) +45
    DocumentFormat.OpenXml.OpenXmlElement.WriteTo(XmlWriter xmlWriter) +232
    DocumentFormat.OpenXml.OpenXmlCompositeElement.WriteContentTo(XmlWriter w) +98
    DocumentFormat.OpenXml.OpenXmlElement.WriteTo(XmlWriter xmlWriter) +232
    DocumentFormat.OpenXml.OpenXmlCompositeElement.WriteContentTo(XmlWriter w) +98
    DocumentFormat.OpenXml.OpenXmlPartRootElement.WriteTo(XmlWriter xmlWriter) +298
    DocumentFormat.OpenXml.OpenXmlPartRootElement.SaveToPart(OpenXmlPart openXmlPart) +146
    DocumentFormat.OpenXml.OpenXmlPartRootElement.Save() +16
    DocumentFormat.OpenXml.Packaging.OpenXmlPackage.SavePartContents() +160
    DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Dispose(Boolean disposing) +27
    DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Dispose() +20
    #tLD.#GOw.Export(Workbook workbook, String path) +146
    GrapeCity.SpreadBuilder.Workbook.Save(String filePath) +39
    GrapeCity.ActiveReports.Export.Excel.Section.XlsExport.Export(SectionDocument document, String filePath, String pageRange) +79
    GrapeCity.ActiveReports.Export.Excel.Section.XlsExport.Export(SectionDocument document, String filePath) +15

    Thanks,
    Ruiwei

  • 597p
    Reema597p 1 year ago

    Hello,

    I have replied to your issue on the following forum link :

    http://arhelp.grapecity.com/groups/topic/export-as-excel-error/

    You are requested to revert on the same to maintain Issue tracking.

    Regards,
    Reema

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.