break

XML PARSE ERROR Missing end-tag Error occurs at or below this element stack

I was trying to return a String with the XML necessary to construct an Excel File. I was using a StringBuilder, and as soon as I declared a table inside the worksheet

For example
sb.Append(“<ss:table>”);

I got the following error:
XML PARSE ERROR: Missing end-tag
Error occurs at or below this element stack:
<ss:workbook>

How Did i fix it?
sb.AppendLine(“ss:table>”); instead of sb.Append(“<ss:table>”);

If you find another fix let me know.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

CAPTCHA Image
Reload Image