The Excel file created in MS Office 2003 can not be saved as .xlsm (2007 format) or .xlmx (2010 format) file.
Simple code:
string fileName = GetPathFile() + “2003.xls”;<?xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /><o:p></o:p> string fileName2007Out = form11.GetPathFile() + “2007Out.xls”;<o:p></o:p> Aspose.Cells.Workbook wb = new try<o:p></o:p> {<o:p></o:p> Aspose.Cells.Workbook if (File.Exists(fileName))<o:p></o:p> {<o:p></o:p> // or wb.Save(fileName2010Out, SaveFormat.Xltx);<o:p></o:p> wb = null;<o:p></o:p> }<o:p></o:p> }<o:p></o:p> catch (Exception {<o:p></o:p> string str } File 2003.xls attached. Can you help us?
Aspose.Cells.Workbook(fileName);<o:p></o:p>
wb = new Aspose.Cells.Workbook(fileName);<o:p></o:p>
wb.Open(fileName);<o:p></o:p>
wb.Save(fileName2007Out, SaveFormat.Xlsm);<o:p></o:p>
ex)<o:p></o:p>
= ex.Message;<o:p></o:p>