I’m trying to use LINQ to XML to create an Excel spreadsheet. I created a template spreadsheet, exported it to XML, pasted the XML into my code and then began to edit it. When I try to create a set of XElements using LINQ, I get these errors:

The first squiggle under <Cell> says “attribute specifier is not a complete statement”
The second under ss says “‘>’ expected”
The third under Type says “‘Type’ is a type and cannot be used in an expression”
Ignore the error under “Lot 1…” I will be putting an expression hole there.
The squiggle under </Cell> says “Identifier expected”
I have all of the Import statements that I should need for this code.
Any suggestions why these errors arise?
It looks like the inline XML after select has to be a single element, and you have two. Try putting them inside a root element.