Excel.Application myExcelApp;
Excel.Workbook myExcelWorkbook;
Excel.Worksheet myExcelWorksheet;
object misValue = System.Reflection.Missing.Value;
myExcelApp = new Excel.ApplicationClass();
myExcelWorkbook = myExcelApp.Workbooks.Add(misValue);
myExcelWorksheet = (Excel.Worksheet)myExcelWorkbook.ActiveSheet;
myExcelApp.Visible = false;
myExcelWorksheet.SaveAs(filepath, Microsoft.Office.Interop.Excel.XlFileFormat.xlExcel8, misValue, misValue, misValue, misValue, misValue, misValue, misValue, misValue);
myExcelApp.Quit();
// this coding working fine in c# 3.5 frame work
No comments:
Post a Comment