Posted on: 3/3/2014 9:15:12 AM | Views : 509

Hello, how to fill excel from database from row 5 
SqlConnection cnn; string sql = null; string data = null; int i = 3; int j = 0; Excel.Application xlApp; Excel.Workbook xlWorkBook; Excel.Worksheet xlWorkSheet; object misValue = System.Reflection.Missing.Value; xlApp = new Excel.ApplicationClass(); xlApp.Visible = true; string dir = System.IO.Directory.GetCurrentDirectory() + "\\Service.xls"; xlWorkBook = xlApp.Workbooks.Open(dir, 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0); xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1); cnn = new SqlConnection(ConnectionClass.connect); cnn.Open(); sql = "SELECT ...

Go to the complete details ...