I\'m looking for a way to essentially take a folder of excel files that are the old 2003 file extension .xls and convert them into .xlsm. I realize you can go into the exce
This is not my code, but I have used ClosedXML before and it is awesome. I found this on the FAQ asking if it supports Excel 2003 which looks like it should work for you...
To clarify, this uses the Office Interop library not closedXML, but I mentioned it incase you had any additional modifications you needed.
public void Convert(String filesFolder)
{
files = Directory.GetFiles(filesFolder);
var app = new Microsoft.Office.Interop.Excel.Application();
var wb = app.Workbooks.Open(file);
wb.SaveAs(Filename: file + "x", FileFormat: Microsoft.Office.Interop.Excel.XlFileFormat.xlOpenXMLWorkbook);
wb.Close();
app.Quit();
}
Here is the link
hope it helps :D