/// <summary> /// Generate Excel report from array of object arrays. Generated cells /// are treated as text and no column headers are produced. /// </summary> /// <param name="inputData">Array of object arrays</param> /// <param name="outputFile">Filename for report output</param> public static void GenerateReport(object[][] inputData, string outputFile) { using (SpreadsheetDocument ssDoc = ExcelReportGenerator.CreateNewSpreadsheetDocument(outputFile)) { ExcelReportGenerator.OutputRawData(inputData, ssDoc, "Sheet1"); } }
/// <summary> /// Generate Excel report from array of object arrays. Generated cells /// are treated as text and no column headers are produced. /// </summary> /// <param name="inputData">Array of object arrays</param> /// <returns>MemoryStream containing Excel report</returns> public static MemoryStream GenerateReport(object[][] inputData) { MemoryStream ms = new MemoryStream(); using (SpreadsheetDocument ssDoc = ExcelReportGenerator.CreateNewSpreadsheetDocumentInMemory(ms)) { ExcelReportGenerator.OutputRawData(inputData, ssDoc, "Sheet1"); } return ms; }