Hi,
I am using Aspose.grid as evaluation version & on the last phase of process.
Can u please let me know the pricing for the product..will manage to buy in last week of this month.
I am facing problem with the following code:
Private Sub btnSaveGrid_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSaveGrid.Click
Dim strFileName As String
strFileName = Server.MapPath(".") & "\Required Files\Sold\SoldDetails" & FormatDateTime(Date.Now(), DateFormat.LongDate) & ".xls"
Try
GridWeb1.WebWorksheets.SaveToExcelFile(strFileName, FileFormatType.Excel2003)
Dim file As System.IO.FileInfo = New System.IO.FileInfo(strFileName)
If file.Exists Then
Response.Clear()
Response.AddHeader("Content-Disposition", "attachment; filename=" & file.Name)
Response.AddHeader("Content-Length", file.Length.ToString())
Response.ContentType = "application/vnd.ms-excel"
Response.WriteFile(file.FullName)
Response.End()
Else
Response.Write(" ")
End If
Catch ex As Exception
Finally
strFileName = ""
End Try
End Sub
Its a .net Button from which i am facilating user to download grid as excel.I am facing problem when user will save the grid as excel, he should be able to see column names....where as its saving only data not the columns.
Ashutosh
for ex...i am showing plot no & phone no..& when i will save the Data as excel..it should save like...
PlotNo PhoneNo.
1 568142
2 2354876
where as its showing
1 568142
2 2354876
So how can i get headers while saving sheet using SaveToExcelFile Method