Entire Gridview to excel in Defined cell value
Hi, good morning!!
In this code I have specific values , but I require that fill the excel worksheet start range in " C7 " to " I" cell ..
it's possible to export all gridview table in a specific cell values?
Gridview1 values start in C7 to finish value..
I use devexpress gridcontrol..
Code:
Dim CellValue, CellValue2, CellValue3, CellValue4, CellValue5, CellValue6 As String
CellValue = GridView1.GetFocusedRowCellValue("project")
CellValue2 = GridView1.GetFocusedRowCellValue("project_type")
'CellValue3 = GridView1.GetFocusedRowCellValue("date")
CellValue3 = DateTime.Today
CellValue4 = GridView1.GetFocusedRowCellValue("user_name")
CellValue5 = GridView1.GetFocusedRowCellValue("number")
TextBox1.Text = CellValue
TextBox2.Text = CellValue2
TextBox3.Text = CellValue3
TextBox4.Text = CellValue4
TextBox5.Text = CellValue5
'OPEN MY TEMPLATE
Dim workbook As New Workbook
workbook.LoadDocument("C:\info.xlsx")
workbook.Worksheets(0).Cells("G1").Value = CellValue
workbook.Worksheets(0).Cells("G2").Value = CellValue2
workbook.Worksheets(0).Cells("G3").Value = CellValue3
workbook.Worksheets(0).Cells("G4").Value = CellValue4
workbook.Worksheets(0).Cells("E4").Value = CellValue5
workbook.Worksheets(0).Cells("C7:C10").Value = CellValue6
workbook.SaveDocument("c:\info2.xlsx")
MsgBox("file saved to " & "c:\info2.xlsx", MsgBoxStyle.Information, "Template created..")
Process.Start("EXCEL.EXE", """c:\info2.xlsx""")
Best Regards!!
1 Attachment(s)
Re: Entire Gridview to excel in Defined cell value
An apologize.. attached a screenshot..
Attachment 121245
Best Regards!! :D
Re: Entire Gridview to excel in Defined cell value
Have you asked in the devexpress support forums?