Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Wed Dec 24, 2014 7:01 am

Hi
Is there some way how to convert Excel.Worksheet to PDF only in MemoryStream? I found new method to Workbook.SaveToFile("", Spire.Xls.FileFormat.PDF), but I cannot find solution without saving to a file.

My app is running only in web server and I need
1. create Xls
2. convert it to Pdf
3. save PDF to database (from memory stream - I cannot write files to disk)

I am working with last versions of Spire.Xls, i found demo which is using Spire.Xls.Converter, is is good way for me? Or do you have some other ideas?

Thanks for your reply
Martin

mzahumensky
 
Posts: 18
Joined: Fri May 20, 2011 11:29 am

Wed Dec 24, 2014 7:31 am

Sorry for my mistake. In version 2.9.3 is possible to set second parametr to SaveToStream:

oWorkbook.SaveToStream(sMemoryStream, Spire.Xls.FileFormat.PDF)

This is working perfectly now
Martin

mzahumensky
 
Posts: 18
Joined: Fri May 20, 2011 11:29 am

Wed Dec 24, 2014 7:33 am

Dear mzahumensky,

Glad to hear that your problem has been resolved.

Please feel free to contact us if you have any problems.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.XLS