Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ws.Cells["A1"].Value = "Sample 1";
- ws.Cells["A1"].Style.Font.Bold = true;
- var shape = ws.Drawings.AddShape("Shape1", eShapeStyle.Rect);
- shape.SetPosition(50, 200);
- shape.SetSize(200, 100);
- shape.Text = "Sample 1 text text text";
- if (data.PDFFileName == null) data.PDFFileName = "Spreadsheet.xlsx";
- data.PDFFileName = Path.GetFileNameWithoutExtension(data.PDFFileName) + ".xlsx";
- FileContentResult result = new FileContentResult(pck.GetAsByteArray(), "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
- result.FileDownloadName = data.PDFFileName;
- return result;
- @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