I am getting the following error when I try to open the file. I just started testing this and I do not know what to do. So the code is very preliminary. The code for the class is attached. I only have about a year of C# experience and have not used OpenXML before and the lead programmer is hard to work for.
I want to be able to send a table (or change it to a list or class or something) to this class to make a xlsx spreadsheet. We want to eliminate the need for Excel. This is for health care field.
Thanks for any help I can get on this.
Arep
Replaced Part: /xl/worksheets/sheet.xml part with XML error. A document must contain exactly one root element. Line 1, column 0.
OpenXML Excel program error
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
A RepaskyRank #8,108 · 228 pointsPosted Dec 28, 2011, 11:28 AM EST
columns.Append(CreateColumnData(1, (UInt32)dt.Columns.Count, 20)); But the only thing that works now is the columns width. It does open the spreadsheet,but except for the wider columns, nothing else is in the spreadsheet. The sheet name has changed also. Thanks for any help. ArepA RepaskyRank #8,108 · 228 pointsPosted Dec 30, 2011, 11:03 AM EST