static void Main(string[] args)
{
string filename = @"D:\export\test7.xml";
using (Stream s = new FileStream(filename, FileMode.Open))
{
Workbook wb = new Workbook();
wb.Open(s, FileFormatType.SpreadsheetML);
wb.Save(filename + ".xls", FileFormatType.Excel2003);
}
}
Using the code above with the SpreadsheetML file attached, the output file becomes corrupt and Excel 2003 strips out all the styling information. When saving as SpreadsheetML filetype instead, the saved file is reported to be corrupt and refueses to be opened by excel 2003.
Please note that the attached SpreadsheetML file attached opens fine on excel.
Could you find me a solution so that we can save the file as an Excel 2003 file type and be not corrupted and have retained the styles please?