Convert Pdf to Excel and Open in Browser

Good Morning,

Is there a way to take a new created Aspose.Pdf.Generator.Pdf, convert it to Excel, and then open the converted spreadsheet in a browser window without saving locally?

Thank you for all of your help regarding these matters.

V/R,

Cunning

Hi,


Thanks for contacting support.

In order to accomplish your requirement, first you need to create PDF document using Aspose.Pdf.Generator, save the output in Stream object, Instantiate new Aspose.Pdf.Document instance, save the output in MS Excel format, instantiate Aspose.Cells.Workbook object and finally render the resultant Excel file in Web Browser.

[C#]

Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf();<o:p></o:p>

pdf1.Sections.Add();

pdf1.Sections[0].Paragraphs.Add(new Aspose.Pdf.Generator.Text("Sample Text.. hello world..."));

MemoryStream memorystream = new MemoryStream();

// pdf1.Save("pdfFileName", Aspose.Pdf.Generator.SaveType.OpenInAcrobat, Response)

pdf1.Save(memorystream);

// load PDF file in Document object so that it can be rendered to XLS format

Aspose.Pdf.Document doc = new Aspose.Pdf.Document(memorystream);

memorystream.Seek(0, SeekOrigin.Begin);

// we cannot directly render XLS in web browser

//doc.Save(Response, "resultant.xls", Aspose.Pdf.ContentDisposition.Attachment, New Aspose.Pdf.ExcelSaveOptions())

// save output in MS Excel format

doc.Save(memorystream, SaveFormat.Excel);

//Creating an Workbook object

Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook(memorystream);

//... do something here

//Save in default format and send the file to user so that he may open the file in

//some application or save it to some location

workbook.Save(Response, "Report.xls", Aspose.Cells.ContentDisposition.Inline, new Aspose.Cells.XlsSaveOptions());

// close stream object

memorystream.Close();

Good Morning again,

Thank you very much for responding so promptly and fully.

I have attempted to reproduce the sample you provided, but have run into an issue. For Aspose.Pdf.Cells, I am unable to locate the workbook object. Is this available for Aspose PDF for .NET?

Thank you again for all of your support regarding this.

V/R,

Cunning

Hi Cunning,


Thanks for your feedback. Please note we have suggested you the solution with collaboration of Aspose.Pdf for .NET and Aspose.Cells for .NET. WorkBook is Aspose.Cells for .NET object, you can download it from download section and refer in your project accordingly.

Please feel free to contact us for any further assistance.

Best Regards,

Saleem:

Good Morning,

Is there any way to convert non-editable pdf to Excel, I tried aspose pdf and aspos pdf cell both excel file is creating but content is coming

"

Evaluation Only. Created with Aspose.Cells for Java.Copyright 2003 - 2016 Aspose Pty Ltd.

"Like that only. If any possible way is there means please help me.


V/R,

Saleem

Hi Saleem,


Thanks for your considering Aspose. You are getting the evaluation message because your using Aspose API in evaluation mode. Please make a request for 30 days temporary license to evaluate our product without any limitation. Hopefully your issue will be resolved. Please note while using more than one Aspose API, you need to instantiate License object of each API separately.


Please feel free to contact us for any further assistance.


Best Regards,

Hi
I wants to convert a pdf to excel .
My pdf contains tabular structure which on absorber.getTableList().size() gives 0 which means table does not exists on that page so how can I convert those pdf pages to excel .

@keshav17

Would you kindly share your sample PDF document with us. We will test the scenario in our environment and address it accordingly.