Thank you for your help, Unfortunately Im sorry I'm still battling.
I have an existing designer worksheet.
Dim designer As WorkbookDesigner = New WorkbookDesigner()
Dim workbook As Workbook = New Workbook
which already displays data from an existing OLEDB
connection con = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("~/fpdb/passliabcapture.mdb"))
con.Open()cmd1 = New OleDbCommand("SELECT * FROM [Brokerrecon] WHERE [Comment] = @Comment ORDER BY Comment, Rdate", con)
cmd1.Parameters.Add(New OleDbParameter("@Comment",OleDbType.VarChar, 10))
cmd1.Parameters("@Comment").Value = v1
da.SelectCommand = cmd1
ds = New DataSet()
da.Fill(ds, "Brokerrecon")
Dim dt As DataTable = dsTables("BrokerRecon")
designer = New WorkbookDesigner()
designer.Open(Server.MapPath("~/reports/brokereconind.xls"))
designer.SetDataSource(dt)
designer.Process(True)
Dim name As String = Server.MapPath("~/reports/recon/" & v1 & “.xls”)
designer.Workbook.Save(“Report.xls”, FileFormatType.Default, Aspose.Cells.SaveType.OpenInExcel, Response)
con.Close()
The existing smart markers on the spreadsheet are referenced by @BrokerRecon.Fieldname
All I want to do is add the value of three input fields - which will form part of the headings/references on the sheet - from the .aspx form - into three cells on the spreadsheet generated by the existing code.
Dim designer As WorkbookDesigner = New WorkbookDesigner()
Dim workbook As Workbook = New Workbook(Server.MapPath("~/reports/brokereconind.xls"))
designer.Workbook = workbookDim v1 = CStr(Request.Form(“Comment”))
Dim start As Date = CDate(Request.Form(“From”))
Dim Finish As Date = CDate(Request.Form(“To”))
Dim cells As Cells = workbook.Worksheets(0).Cells
Dim cell As Aspose.Cells.Cell = cells(“B3”)
cell.PutValue(v1)
Dim cell1 As Aspose.Cells.Cell = cells(“B5”)
cell1.PutValue(start)
Dim cell2 As Aspose.Cells.Cell = cells(“B6”)
cell2.PutValue(Finish)
into cells B3, B5 and B6. I can do each seperately, but do not know how to combine the two sets of code to reproduce both the out pt on one sheet.