oXls Excel.Application = новое Microsoft.Office.Interop.Excel.ApplicationClass ();
предмет oMissing = System.Reflection.Missing.Value;
oSpr Excel.Workbook = oXls.Workbooks.Open («ExcelData.xlsx», oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing);
fileFormat предмета = Excel.XlFileFormat.xlXMLSpreadsheet;
oSpr.SaveAs (paramExportFilePath, fileFormat ref, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing);
oSpr.Close ();
oXls.Quit ();
|