can i do something similiar using a datatable or dataview into aspose.cells?
when i use the old stringwriter method my html tags are used to format however when i do the importdatatable in aspose.cells i get just the raw text without the pretty format.
below is my aspose
Dim workbook As New Workbook()
'Adding a new worksheet to the Workbook object
workbook.Worksheets.Add()
'Obtaining the reference of the newly added worksheet by passing its sheet index
Dim worksheet As Worksheet = workbook.Worksheets(0)
worksheet.Cells.ImportDataTable(dt, True, "B9")
'Saving the Excel file
workbook.Save("testinggrid.xlsx", Aspose.Cells.FileFormatType.Excel2007Xlsx, Aspose.Cells.SaveType.OpenInExcel, response)
response.End()
==================
the old method that worked previously
response.ContentType = "application/vnd.ms-excel"
'create a string writer
Dim stringWrite As New System.IO.StringWriter
'create an htmltextwriter which uses the stringwriter
Dim htmlWrite As New System.Web.UI.HtmlTextWriter(stringWrite)
'instantiate a datagrid
Dim dg As New DataGrid
'set the datagrid datasource to the dataset passed in
dg.DataSource = dv
'bind the datagrid
dg.DataBind()
'tell the datagrid to render itself to our htmltextwriter
dg.RenderControl(htmlWrite)
'all that's left is to output the html
response.Write(stringWrite.ToString)
response.End()
attached are the outputs old and new...i would like to have similiar results with aspose.cells (i have a license)