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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Parameter is not valid

Thread ID:

Created:

Updated:

Platform:

Replies:

123415 Mar 16,2016 07:03 AM UTC Mar 17,2016 07:38 AM UTC ASP.NET MVC 1
loading
Tags: XlsIO
Vishal
Asked On March 16, 2016 07:03 AM UTC

Hi,

I try to convert .xls file into images but got "parameter is not valid" exception. Same code working fine when I use .xlsx file but creates issue when I try with .xls file. 

for (i = 0; i < workbook.Worksheets.Count; i++)
            {
                IWorksheet sheet = workbook.Worksheets[i];
                sheet.UsedRangeIncludesFormatting = false;
                int lastRow = sheet.UsedRange.LastRow + 1;
                int lastColumn = sheet.UsedRange.LastColumn + 1;
                try
                {
                    //This code line creates an issue only for .xls file.
                    Image image = sheet.ConvertToImage(1, 1, lastRow, lastColumn, Syncfusion.XlsIO.ImageType.Bitmap, null);
                    image.Save(outputPath + "_" + i + ".jpeg", ImageFormat.Jpeg);
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            } 

Ishwarya Narayanan [Syncfusion]
Replied On March 17, 2016 07:38 AM UTC

Hi Vishal,

 

Thank you for contacting Syncfusion support.

 

As you have created an incident with same query, the response for this query has been updated in that incident. You can follow up the incident for further clarification regarding this query.


Please let us know if you have any concerns.

Regards,
Ishwarya N


CONFIRMATION

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.

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

;