Microsoft.Office.Interop.Excel.Application Excel = new Microsoft.Office.Interop.Excel.Application();
Workbook wb = Excel.Workbooks.Add(XlSheetType.xlWorksheet);
Worksheet ws = (Worksheet)Excel.ActiveSheet;
Excel.Visible = true;
ws.Cells[1, 1] = "Tarih";
ws.Cells[1, 2] = "Kasiyer";
ws.Cells[1, 3] = "Ucret";
ws.Cells[1, 4] = "Bilet No";
ws.Cells[1, 5] = "Firma Adı";
for (int j = 2; j < dataGridView1.Rows.Count; j++)
{
for (int i = 2; i <= 5; i++)
{
ws.Cells[j,i]=dataGridView1.Rows[j-2].Cells[i-1].Value;
}
}
Dates are not coming to First Cell in Excel . How can i do that ? please help me ? And also i have got a warning like "HRESULT özel durum döndürdü: 0x800AC472"