I have an application that I am currently building reports dynamically and exporting to the browser and now need the ability to export as PDF. My thinking is, that since I already have the structure to build these as Excel files, that I build them just the same then convert to PDF is the user prefers that format. How do I go about doing this with Aspose?
ii) Export to PDF using Response object
//… Your code goes here
//Save in pdf format and send the file to the client browser, he may open the file in
//some application or save it to some location
workbook.Save(this.Response, “Report.pdf”, ContentDisposition.Attachment, new PdfSaveOptions());
Let us know if you have any confusion or query.
Unfortunately, this is not working. I am not creating the Excel files dynamically with Aspose nor do I have a physical file that I am starting with. I am creating the Excel files dynamically with another product and, unfortunately cannot rewrite all of the code at this time to convert to utilize Aspose.Cells. My long term solution would be to take this approach but for now I need to to take the stream or the Excel file in memory (which I already have) and convert to a PDF and export to the browser.
Ok, I got this working. I was trying to do this with Aspose.PDF instead of Aspose.Cells. Thanks.