Last active
August 29, 2015 14:05
-
-
Save thesowah/8c08e45da4ec34233367 to your computer and use it in GitHub Desktop.
Fixes error in parsing XML to excel worksheet [ASP.NET C#]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using Notepad++ search and replac all the illegal characters in XML file | |
//#1 All cells with whitespace and chars like '&' but start with alphabets | |
Find: <Data ss:Type="String">([a-zA-Z]+(.+))</Data> | |
Replace: <Data ss:Type="String"><![CDATA[$1]]></Data> | |
//#2 All empty cells | |
Find: <Data ss:Type="String">*</Data> | |
Replace: <Data ss:Type="String"><![CDATA[-]]></Data> | |
//#3 Done! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment