We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Freeze converting a XLSX file into PDF file

Thread ID:





147360 Sep 7,2019 01:50 PM UTC Sep 9,2019 12:29 PM UTC Xamarin.Forms 1
Tags: XlsIO
Asked On September 7, 2019 01:50 PM UTC

Hi everyone, I'm new in this area...so maybe i'm doing something wrong but i can't convert a XSLX file to a PDF file...I'm following the example on the web:
protected async Task ConvertXlsToPdf(string filename)
byte[] fileStream = await FileHandler.LoadFile(filename, DependencyService.Get().GetDownloadFolder());

Stream stream = new MemoryStream(fileStream);

using (ExcelEngine excelEngine = new ExcelEngine())
IApplication application = excelEngine.Excel;
IWorkbook workbook = application.Workbooks.Open(stream);
XlsIORenderer renderer = new XlsIORenderer();

PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);

//Save the PDF document to stream.
MemoryStream stream2 = new MemoryStream();

return stream2;

It freezes on this line
IWorkbook workbook = application.Workbooks.Open(stream);
I attached my xlsx file for test

Attachment: test_c59d087d.rar

Abirami Varadharajan [Syncfusion]
Replied On September 9, 2019 12:29 PM UTC

Hi Matias, 

Greetings from Syncfusion. 

We are unable to reproduce the issue. The shared Excel document is getting converted to PDF properly at our end. We are sharing below sample for your reference. 

Kindly check if the shared sample works fine at your end. If the issue still persist, please share issue reproducing sample along with your working version of Syncfusion assemblies/NuGet. This will be helpful for us to validate further from our side and to provide prompt solution at the earliest. 



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon