Hi All,
While Writing to Excel File using the ClosedXML facing an issue. Above is the error mentioned into caption which I am getting.
Have attached the Excel File which I am trying to Write by passing the DataSet.
Please Reply ASAP.
Thanks,
Samir.
Comments: Hi, I have same problem. It seems to fail to write the xml and contains invalid characters. Example: * u0010 * u0011 * u0012 * u0013 etc… Stack trace: ``` 場所 System.Xml.XmlUtf8RawTextWriter.InvalidXmlChar(Int32 ch, Byte* pDst, Boolean entitize) 場所 System.Xml.XmlUtf8RawTextWriter.WriteElementTextBlock(Char* pSrc, Char* pSrcEnd) 場所 System.Xml.XmlUtf8RawTextWriter.WriteString(String text) 場所 System.Xml.XmlWellFormedWriter.WriteString(String text) 場所 DocumentFormat.OpenXml.OpenXmlLeafTextElement.WriteContentTo(XmlWriter w) 場所 DocumentFormat.OpenXml.OpenXmlElement.WriteTo(XmlWriter xmlWriter) 場所 DocumentFormat.OpenXml.OpenXmlCompositeElement.WriteContentTo(XmlWriter w) 場所 DocumentFormat.OpenXml.OpenXmlElement.WriteTo(XmlWriter xmlWriter) 場所 DocumentFormat.OpenXml.OpenXmlCompositeElement.WriteContentTo(XmlWriter w) 場所 DocumentFormat.OpenXml.OpenXmlPartRootElement.WriteTo(XmlWriter xmlWriter) 場所 DocumentFormat.OpenXml.OpenXmlPartRootElement.SaveToPart(OpenXmlPart openXmlPart) 場所 DocumentFormat.OpenXml.OpenXmlPartRootElement.Save() 場所 DocumentFormat.OpenXml.Packaging.OpenXmlPackage.SavePartContent(OpenXmlPart part) 場所 DocumentFormat.OpenXml.Packaging.OpenXmlPackage.TrySavePartContent(OpenXmlPart part) 場所 DocumentFormat.OpenXml.Packaging.OpenXmlPackage.SavePartContents() 場所 DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Dispose(Boolean disposing) 場所 DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Dispose() 場所 ClosedXML.Excel.XLWorkbook.CreatePackage(String filePath, SpreadsheetDocumentType spreadsheetDocumentType) 場所 ClosedXML.Excel.XLWorkbook.SaveAs(String file) ```
While Writing to Excel File using the ClosedXML facing an issue. Above is the error mentioned into caption which I am getting.
Have attached the Excel File which I am trying to Write by passing the DataSet.
Please Reply ASAP.
Thanks,
Samir.
Comments: Hi, I have same problem. It seems to fail to write the xml and contains invalid characters. Example: * u0010 * u0011 * u0012 * u0013 etc… Stack trace: ``` 場所 System.Xml.XmlUtf8RawTextWriter.InvalidXmlChar(Int32 ch, Byte* pDst, Boolean entitize) 場所 System.Xml.XmlUtf8RawTextWriter.WriteElementTextBlock(Char* pSrc, Char* pSrcEnd) 場所 System.Xml.XmlUtf8RawTextWriter.WriteString(String text) 場所 System.Xml.XmlWellFormedWriter.WriteString(String text) 場所 DocumentFormat.OpenXml.OpenXmlLeafTextElement.WriteContentTo(XmlWriter w) 場所 DocumentFormat.OpenXml.OpenXmlElement.WriteTo(XmlWriter xmlWriter) 場所 DocumentFormat.OpenXml.OpenXmlCompositeElement.WriteContentTo(XmlWriter w) 場所 DocumentFormat.OpenXml.OpenXmlElement.WriteTo(XmlWriter xmlWriter) 場所 DocumentFormat.OpenXml.OpenXmlCompositeElement.WriteContentTo(XmlWriter w) 場所 DocumentFormat.OpenXml.OpenXmlPartRootElement.WriteTo(XmlWriter xmlWriter) 場所 DocumentFormat.OpenXml.OpenXmlPartRootElement.SaveToPart(OpenXmlPart openXmlPart) 場所 DocumentFormat.OpenXml.OpenXmlPartRootElement.Save() 場所 DocumentFormat.OpenXml.Packaging.OpenXmlPackage.SavePartContent(OpenXmlPart part) 場所 DocumentFormat.OpenXml.Packaging.OpenXmlPackage.TrySavePartContent(OpenXmlPart part) 場所 DocumentFormat.OpenXml.Packaging.OpenXmlPackage.SavePartContents() 場所 DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Dispose(Boolean disposing) 場所 DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Dispose() 場所 ClosedXML.Excel.XLWorkbook.CreatePackage(String filePath, SpreadsheetDocumentType spreadsheetDocumentType) 場所 ClosedXML.Excel.XLWorkbook.SaveAs(String file) ```