Excel file is not converting to pdf

Hello Team,

This file is testr.zip (84.3 KB)
not able to convert onto PDF. Please look into it.

@vagarwal,

Thanks for the template file.

Which version of the product you are using?

Please try our latest version/fix: Aspose.Cells for .NET v19.2.3 (attached)

I have tested by converting your template file to PDF file format using Aspose.Cells for .NET v19.2.3, it works fine to generate the output file and output PDF file is fine tuned. I could not notice any issue in both pages (regarding contents, formattings, shapes, etc.) in the output PDF file.

If you still find the issue with v19.2.x, kindly do provide sample code (runnable) and screenshots to highlight the issue, we will check it soon.
Aspose.Cells19.2.3 For .Net2_AuthenticodeSigned.Zip (4.8 MB)
Aspose.Cells19.2.3 For .Net4.0.Zip (4.8 MB)

Hello Amjad,

I am working with your latest dll also and will update you later

I have issue with this file only not other and working fine

I am using attached dll v4.0_17.12.0.0__716fcc553a201e56.zip (3.4 MB)
and below code to convert it to pdf

string resourceName = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceNames()[0];
Aspose.Cells.License license = new Aspose.Cells.License();
license.SetLicense(GetEmbeddedResourceStream(“LF.GlobalDMS.Layouts.LF.GlobalDMS.License.Aspose.Total.lic”));//resourceName
Aspose.Pdf.License Pdflicense = new Aspose.Pdf.License();
Pdflicense.SetLicense(GetEmbeddedResourceStream(“LF.GlobalDMS.Layouts.LF.GlobalDMS.License.Aspose.Total.lic”));//resourceName
Pdflicense.Embedded = true;
MemoryStream oConvertedStream = new MemoryStream();
SPFile dccSourcePdfFile = null;
SPFile ConvertedFile = null;
Workbook workbook = new Workbook(memStr);
string PDFlinkFileName = dccSourceFile.Item[“LinkFilename”] as string;
string strExt = Path.GetExtension(PDFlinkFileName);
string strFileName = PDFlinkFileName.Substring(0, PDFlinkFileName.LastIndexOf(’.’));
if (strExt.ToLower() == “.xls”)
{

            strExt = strExt.ToLower().Replace("xls", "pdf");

            PDFlinkFileName = strFileName + strExt;
        }
        else if (strExt.ToLower() == ".xlsm")
        {


            strExt = strExt.ToLower().Replace("xlsm", "pdf");

            PDFlinkFileName = strFileName + strExt;
        }
        else
        {
            strExt = strExt.ToLower().Replace("xlsx", "pdf");
            PDFlinkFileName = strFileName + strExt;
        }
        //Save Options

        Aspose.Cells.PdfSaveOptions opts = new Aspose.Cells.PdfSaveOptions();
        workbook.Save(oConvertedStream, opts);

@vagarwal,

Since you are using older version 17.12 of the product which might show such exception or limitation in it. We recommend you to upgrade to latest APIs set (e.g Aspose.Cells for .NET v19.2.x (latest)), you might require to update your existing code when upgrading to latest APIs set.

PS. Please note, we cannot evaluate issues in older versions, the fixes are based on latest APIs set only. It is quite possible that in older version the feature might have an issue. Such kind of issue might be already fixed in newer versions. So we recommend you to kindly try using latest version of the product.

Thank you Ahsan, after upgrading dll, system is able to convert the file onto pdf.

Hello Ahsan,

Just small info, why this issue with a single file not other files.

@vagarwal,

Good to know that your issue is sorted out by the suggested version. It is quite difficult to state the reason of this issue with the sample file as this issue is not analyzed with the older version. If you face some problem with the latest version, we may provide some additional information if possible.

Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

After updating above dll, i am getting the error message ‘Invalid license signature. Please make sure the license file was not modified."}’…

Yes, i have modified it because date was 20190223, i got exception that dll is higher version of current subscription expiry date(similar message).

Then i have modified it to ‘20200223’ and it is working in my DEV server but not in QA server and getting above error message.

Please help.

@vagarwal,

I am afraid you should not update your existing license (whose expiry date is “20190223”). Because if you do that Aspose.Cells would not work any longer. Instead please try to use any version which should be released before your subscription expiry date. For example, you may try to use Aspose.Cells v19.1 which should also work fine on your end as this version was also released before your subscription expiry date (“20190223”). So, kindly use it with your original copy of the license (having expiry date “20190223”) with Aspose.Cells for .NET v19.1, it will work for your needs.

Can you please provide me v19.1 dll which will work on 20190223, and it should work on above document as well as mentioned in my earlier reply…

@vagarwal,

You may download it here:

Please download Aspose.Cells for .NET v19.1 and give it a try, it should work fine.

Hello Amjad,

Thanks for your support, above dll works fine.

Now i have another issue with a excel file ROUTFSID061 FAB KU4BP ROUTING.zip (439.8 KB)
and getting below error message while debugging and not able to release it to pdf.

{“The form submission cannot be processed because it exceeded the maximum length allowed by the Web administrator. Please resubmit the form with less data.”}

Here is some code

workbook.Save(oConvertedStream, opts);
if (oConvertedStream != null)
{
if (oConvertedStream.Length > 0)
{
dccSourcePdfFile = dccSourceFile.ParentFolder.Files.Add(dccSourceFile.Web.Site.MakeFullUrl(dccSourceFile.ParentFolder.ServerRelativeUrl + “/” + PDFlinkFileName), oConvertedStream, true);

Getting error on above line

@vagarwal,

Thanks for the sample file and details.

The error does not seem to have any links or concerns to Aspose.Cells APIs. The issue is generic and you should troubleshoot and sort it out by yourself by browsing internet to find relevant documents/forums and other details accordingly. For example, see the page for your reference: