oXls de Excel.Application = Microsoft.Office.Interop.Excel.ApplicationClass novo ();
objeto que oMissing = System.Reflection.Missing.Value;
oSpr de Excel.Workbook = oXls.Workbooks.Open (“ExcelData.xlsx”, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing);
fileFormat do objeto = Excel.XlFileFormat.xlXMLSpreadsheet;
oSpr.SaveAs (paramExportFilePath, fileFormat da referência, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing);
oSpr.Close ();
oXls.Quit ();
|