GroupDocsGists
10/24/2017 - 1:48 PM

GenerateInTableListWithHighlightedRowsFromDatabaseinSpreadsheetFormat.cs

// For complete examples and data files, please go to https://github.com/groupdocsassembly/GroupDocs_Assembly_NET
//Setting up source spreadsheet template
const String strSpreadsheetTemplate = "Spreadsheet Templates/In-Table List with Highlighted Rows_DB.xlsx";
//Setting up destination document report 
const String strSpreadsheetReport = "Spreadsheet Reports/In-Table List with Highlighted Rows_DB Report.xlsx";
try
{
    //Instantiate DocumentAssembler class
    DocumentAssembler assembler = new DocumentAssembler();
    //Call AssembleDocument to generate In-Table List with Highlighted Rows Report in spreadsheet format
    assembler.AssembleDocument(CommonUtilities.GetSourceDocument(strSpreadsheetTemplate), CommonUtilities.SetDestinationDocument(strSpreadsheetReport), DataLayer.GetOrdersDataDB(), "orders");
}
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}