Excel.Application oXls = new Microsoft.Office.Interop.Excel.ApplicationClass();
object oMissing = System.Reflection.Missing.Value;
Excel.Workbook oSpr = oXls.Workbooks.Open("ExcelData.xlsx", oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing);
object fileFormat = Excel.XlFileFormat.xlXMLSpreadsheet;
oSpr.SaveAs(paramExportFilePath, ref fileFormat, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing);
oSpr.Close();
oXls.Quit();
|