Problem with convert table to range

Hi Team,

I have issue with Aspose.Cell.dll
Conversion table to range not working with version 18.2.5 (Value cannot be null.)
But it works with old version 17.11.6
My code is:
string dataDir = Server.MapPath(“Invoices/”);
string filePath = dataDir + “Table Convert Test_02.xlsx”;
Workbook workbook = new Workbook(filePath);
Worksheet ws = workbook.Worksheets[“Pg2 Acct Code Breakdown”];
ArrayList dNames = new ArrayList();
for (int i = 0; i < ws.ListObjects.Count; i++)
{
string tname = ws.ListObjects[i].DisplayName;
dNames.Add(tname);
}

    if (dNames.Count != 0)
    {
        for (int i = 0; i < dNames.Count; i++)
        {
            string tname = dNames[i].ToString();
            Aspose.Cells.Tables.ListObject obj_Pg = ws.ListObjects[tname];
            obj_Pg.ConvertToRange();
        }
    }
    string filePathOut = dataDir + "output_TableToRange.xlsx";
    workbook.Save(filePathOut);

I did attached file for test.

Please help.
Thank you,
paTable Convert Test_02.zip (16.9 KB)

@rudolfkalik,

Thanks for the sample code and template file.

After an initial test, I am able to observe the issue as you mentioned by using your sample code with your template file. I found an exception “Value cannot be null” when using ListObject.ConvertToRange() method:
e.g
Sample code:

  string filePath = "e:\\test2\\Table Convert Test_02.xlsx"; 
            Workbook workbook = new Workbook(filePath); 
            Worksheet ws = workbook.Worksheets["Pg2 Acct Code Breakdown"]; 

            ArrayList dNames = new ArrayList(); 
            for (int i = 0; i < ws.ListObjects.Count; i++) 
                { 
                    string tname = ws.ListObjects[i].DisplayName; 
                    dNames.Add(tname); 

                } 

            if (dNames.Count != 0) 
            { 
                for (int i = 0; i < dNames.Count; i++) 
                    { 
                        string tname = dNames[i].ToString(); 
                        Aspose.Cells.Tables.ListObject obj_Pg = ws.ListObjects[tname]; 
                        obj_Pg.ConvertToRange();//Exception 
                    } 
            } 

            workbook.Save("e:\\test2\\out1.xlsx"); 

I have logged a ticket with an id “CELLSNET-46085” for your issue. We will look into it soon.

Once we have an update on it,w e will let you know here.

@rudolfkalik

Thanks for using Aspose APIs.

This is to inform you that we have fixed your issue CELLSNET-46085 now. We will soon provide the fix after performing QA and including other enhancements and fixes.

@rudolfkalik,

Could you try our latest version/fix: Aspose.Cells for .NET v18.4.3:

It should fix your issue now as I did test using latest version/fix: v18.4.3.
Let us know your feedback.

Hi Amjad,

Please send me Aspose.Cells for .NET 4.0 - 18.4.3 in zip file.
I cannot use dropbox in my company.

Thank you,
pa

@rudolfkalik

We have sent the zip file at your registered email. i.e.

rka***k@p*****nj.gov

Hi Shakeel,

I did not receive the zip file.
Please try send this file also to email address: rka***k@stellarservices.com
(rka***k is the same as in my register email)

Thank you,
pa

@rudolfkalik

Done. Please check. You should also check your Spam or Junk folder.

Hi Shakeel,

I did test. It is working properly.
Thank you for the fix.
Now I am still waiting for release with fixing ticket CELLNET - 46075 (convert Excel to PDF problem).

Best regards,
pa

@rudolfkalik

Thanks for using Aspose APIs.

This issue i.e. CELLNET-46075 is also resolved in the fix I provided you via email. I have also notified you in the original thread now.

Post Reference:

Thank you Shakeel.

Yes, I see fix is done. I tested and it’s working now.

Regards,
pa

@rudolfkalik

Thanks for your feedback and sharing a good news with us. Have a good day. Regards.

@rudolfkalik

Thanks for using Aspose APIs.

We recommend you to try the following new fix for your issue CELLSNET-46085 instead of old one.

The issues you have found earlier (filed as CELLSNET-46085) have been fixed in this update. Please also check the document/article for your reference: Install Aspose Cells through NuGet|Documentation