Hi Guys
I have been trying to export multiple div tags with data to MS Excel using multiple spreadsheets.
Below is an example of what I have used, but it only exports one div data.
Response.ContentType =
"application/force-download"
Response.AddHeader(
"content-disposition", "attachment; filename=testxml.xls"
);
Response.Write(
"<html xmlns:x=\"urn:schemas-microsoft-com:office:excel\">");
Response.Write( "<head>" );
Response.Write("<meta http-equiv=\"Content-Type\"
content=\"text/html; charset=utf-8\">");
Response.Write( "<x:ExcelWorksheet>" );
Response.Write( "<x:Name>Sheet 3 - Report Data</x:Name>" );
Response.Write( "<x:WorksheetOptions>" );
Response.Write( "<x:Panes>" );
Response.Write( "" + html + "" );
Response.Write( "</x:Panes>" );
Response.Write( "</x:WorksheetOptions>" );
Response.Write( "</x:ExcelWorksheet>" );
Response.Write( "</x:ExcelWorksheets>" );
Response.Write("</x:ExcelWorkbook>" );
Response.Write( "</xml>" );
Response.Write( "</head>" );
Response.Write( "<body>" );
Response.Write( "" + html + "" );
Response.Write( "</body>" );Response.Write( "</html>" );