if (File.Exists(path1)) File.Delete(path1); int i = 1; foreach (DataRow row in ds1.Tables[0].Rows) { xlWorkSheet.Cells[i, 1] = row[2]; i++; } xlWorkBook.SaveAs(path1, Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, Excel.XlSaveAsAccessMode.xlShared, misValue, misValue, misValue, misValue, misValue); xlWorkBook.Close(true, misValue, misValue);
xlWorkSheet
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)