Free Support Forum - aspose.com

Using Aspose.Excel

Our requirement is that our designer should be highly flexible and Admin user friendly. Admin user can put any field from any table while modifying the designer and control/code should take care of the rest to generate excel file as per the updated designer.

we are using Aspose.Excel and template is generated as putting e.g <> tags in Excel where insured is a tablename and insuredname is field name.

we dont want to use smart markers as suggested,

How do we display data in excel as its works fine by word doc using Aspose.Word

following is sample code we used in Word

dsAgency = SqlHelper.ExecuteDataset(MyConnectionString, CommandType.StoredProcedure, "sp_RunEportQuoteBinderLetters_Part2", arrParameters)

Dim doc As Document = OpenDoc(filename)

doc.MailMerge.Execute(dsAgency.Tables(1))

doc.Save(SavePath & FileNameOnly)

Regards,

Aarti Sawant

I think I didn't clearly understand your need early.

Actually Aspose.Excel works in the similiar way with smart marker technique.

You can put a smart marker "&=Insured.InsuredName", then you can use the following sample code:

dsAgency = SqlHelper.ExecuteDataset(MyConnectionString, CommandType.StoredProcedure, "sp_RunEportQuoteBinderLetters_Part2", arrParameters)

Dim designer as ExcelDesigner = new ExcelDesigner()

designer.Open(fileName);

designer.SetDataSource(dsAgency.Tables(1))

designer.Process()

designer.Save(SavePath & FileNameOnly)