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.Save(SavePath & FileNameOnly)