-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export grid to excel, hexadecimal value 0x1D, is an invalid character. #413
Comments
I've tried to reproduce this error with a column value "zSF�91EE09�921+/yC17ohC" and everything is working fine. Are you using WASM or Blazor Server? Could you send me a project with a grid producing this error? |
@gustavnavar Blazor Server, please try with \ u001d unicode symbol, reproduced only if this unicode simbol in string, if you will not able to reproduce, I will create small project with example |
I could reproduce it inserting \u001d unicode character in a text field of the database. I get this exception: Unhandled exception rendering component: '�', hexadecimal value 0x1D, is an invalid character.
System.ArgumentException: '�', hexadecimal value 0x1D, is an invalid character.
at System.Xml.XmlUtf8RawTextWriter.InvalidXmlChar(Int32 ch, Byte* pDst, Boolean entitize)
at System.Xml.XmlUtf8RawTextWriter.WriteElementTextBlock(Char* pSrc, Char* pSrcEnd)
at System.Xml.XmlUtf8RawTextWriter.WriteString(String text)
at System.Xml.XmlWellFormedWriter.WriteString(String text)
at DocumentFormat.OpenXml.OpenXmlLeafTextElement.WriteContentTo(XmlWriter w)
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.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.OpenXmlElement.WriteTo(XmlWriter xmlWriter)
at DocumentFormat.OpenXml.OpenXmlCompositeElement.WriteContentTo(XmlWriter w)
at DocumentFormat.OpenXml.OpenXmlPartRootElement.WriteTo(XmlWriter xmlWriter)
at DocumentFormat.OpenXml.OpenXmlPartRootElement.Save(Stream stream)
at DocumentFormat.OpenXml.OpenXmlPartRootElement.SaveToPart(OpenXmlPart openXmlPart)
at DocumentFormat.OpenXml.OpenXmlPartRootElement.Save()
at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.TrySavePartContent(OpenXmlPart part)
at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.SavePartContents(Boolean save)
at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Dispose(Boolean disposing)
at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Dispose()
at GridBlazor.ExcelWriter.GenerateExcel(ExcelData data) in C:\Users\GustauNavarro\source\repos\Grid.Blazor\GridBlazor\ExcelWriter.cs:line 201
at GridBlazor.ExcelWriter.GenerateExcel[T](IGridColumnCollection`1 columns, IEnumerable`1 items) in C:\Users\GustauNavarro\source\repos\Grid.Blazor\GridBlazor\ExcelWriter.cs:line 168 |
Package 5.0.12 cleans all excel cell content (remove all XML invalid characters) before export is done. |
If grid row column contains � symbol, export crash the system.
for exmple column string:
0104066752617374215&HY7wBKPSzSF�91EE09�921+/yC17ohCznulAYWaWbHLL3oHwVY+pvaKsvJZ9i8CI=
The text was updated successfully, but these errors were encountered: