Don't like ads? PRO users don't see any ads ;-)

Untitled

By: pavelEspitia on May 7th, 2012  |  syntax: C#  |  size: 0.38 KB  |  hits: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. file = HttpContext.Current.Server.MapPath("~").ToString() + file;
  2.             string excelfile = file + ".xlsx";
  3.             using (SpreadsheetDocument excelDoc = SpreadsheetDocument.Create(excelfile, DocumentFormat.OpenXml.SpreadsheetDocumentType.Workbook))
  4.             {
  5.                 CreateExcelParts(excelDoc, table);
  6.                
  7.             }
  8.             return excelfile;