I have a template of an Excel XML document. Is there anyway I can build the XML document is SQL and have SQL Server return the XML document to me via stored proc.?
I am trying to see if SQL Server can not just return the data for the spreadsheet but the actual Excel XML document with the data in it.
Something similar to this.
http://msdn.microsoft.com/en-us/library/office/aa191724%28v=office.11%29.aspx
I want to build the XML is SQL.
Yes, you can use the FOR XML clause.
select * from table for xml raw
You can also use XML AUTO or XML EXPLICIT