Discussion in 'Coffee Corner' started by DeepikaC, Dec 17, 2013.
Please help us to write a XML code to add multiple worksheets in excel.
Hi, Check this or This or This
Creating reasonably advanced spreadsheets using XML is fairly simple using the Microsoft's 'XML Spreadsheet 2003' format. I have a package that I created that spits out a lot of reporting in the apps I created for my employer. I cannot give you the code -- it's not mine to give. The attached file (which should have an XML extension, but the attachment code is not happy with) is a simple XML spreadsheet with three tabs.
The header (everything above <Worksheet ss:Name="Sheet1">) is what tells Excel to treat this as a spreadsheet, what the fonts are, etc.
The three tabs (worksheets) are reasonably obvious in the file.
Over the years that I've used my package, at need I have added various capabilities and it handles a great deal of cell formatting (bold, italics, font colors, background colors, etc.) Generally, when I have needed something my code doesn't do, I simply do that in excel to a spreadsheet, then save it in 'XML Spreadsheet 2003' format to see what my code needs to to to generate that effect.