Posted on: 10/10/2013 5:33:09 AM | Views : 686

Hi 
I want to display result set from database into the excel using openxml (export data in Excel). i am unable to get the data for second sheet into worksheet in excel.
here is the code....

public void Create<T>( string fileName, List<Vulnerability> objects, List<QIDTab> objectQIDTab, string sheetName, string sheetName1, List<string> headerNames, List<string> headerQIDTab) { //WorkbookPart workbookpart = spreadSheet.AddWorkbookPart(); //CreateWorkbookPart(workbookpart,objects, objectQIDTab, sheetName, sheetName1, headerNames, headerQIDTab); //workbookpart.Workbook.Save();
//Open the copied template workbook. // SpreadsheetDocument myWorkbook = SpreadsheetDocument.Create(fileName, SpreadsheetDocumentType.Workbook);
WorkbookPart workbookPart = spreadSheet.AddWorkbookPart(); WorksheetPart worksheetPart = workbookPart.AddNewPart<Workshe ...

Go to the complete details ...