Advertisement
Guest User

Untitled

a guest
Jun 29th, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. ws.Cells["A1"].Value = "Sample 1";
  2. ws.Cells["A1"].Style.Font.Bold = true;
  3. var shape = ws.Drawings.AddShape("Shape1", eShapeStyle.Rect);
  4. shape.SetPosition(50, 200);
  5. shape.SetSize(200, 100);
  6. shape.Text = "Sample 1 text text text";
  7.  
  8. if (data.PDFFileName == null) data.PDFFileName = "Spreadsheet.xlsx";
  9. data.PDFFileName = Path.GetFileNameWithoutExtension(data.PDFFileName) + ".xlsx";
  10.  
  11. FileContentResult result = new FileContentResult(pck.GetAsByteArray(), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
  12. result.FileDownloadName = data.PDFFileName;
  13. return result;
  14.  
  15. @Ajax.ActionLink("Created Spreadsheet", "ExportToExcel", "GraphReport", null, new AjaxOptions { HttpMethod = "POST" }, new { @class="btn btn-warning" })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement