Copy Range between two different Worksheet from two different Workbooks doesn't copy ListObjects

Ok, you can find an example in https://docs.google.com/a/vizubi.com/file/d/0B-EFyDLlJnAsNkhaX0RhY2NKT00/edit


You just neet to run the project Cells.Case6986\Cells.Case6986.csproj

Hi,


I have downloaded and checked your referred project @: https://docs.google.com/a/vizubi.com/file/d/0B-EFyDLlJnAsNkhaX0RhY2NKT00/edit?pli=1

Well, you got to use PasteOptions while copying ranges b/w worksheets/workbooks to render/copy the List objects / tables. See the updated code that works fine as I tested using your template file.

Sample code:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Aspose.Cells;

namespace Vizubi.RegressionsTest.Aspose.Cells.Case6986
{
class Program
{
static void Main(string[] args)
{
var wbk = new Workbook(@“E:\test2\Cells.Case6986\template.xlsx”);
var wbktmp = new Workbook();

System.Console.WriteLine(wbk.Worksheets[0].ListObjects.Count.ToString()); // 2

PasteOptions options = new PasteOptions();
options.PasteType = PasteType.All;

wbktmp.Worksheets[0].Cells.CreateRange(0, 0, 9, 4).Copy(wbk.Worksheets[0].Cells.CreateRange(2, 0, 9, 4),options);

System.Console.Write("Case 6986.1: ");
System.Console.WriteLine(wbktmp.Worksheets[0].ListObjects.Count == wbk.Worksheets[0].ListObjects.Count ? “SUCCESS” : “FAILED”); //SUCCESS

wbktmp = new Workbook();

wbktmp.Worksheets[0].Cells.CreateRange(0, 0, 100, 100).Copy(wbk.Worksheets[0].Cells.CreateRange(0, 0, 100, 100), options);


System.Console.Write("Case 6986.2: ");
System.Console.WriteLine(wbktmp.Worksheets[0].ListObjects.Count == wbk.Worksheets[0].ListObjects.Count ? “SUCCESS” : “FAILED”); //SUCCESS

System.Console.ReadLine();
}
}
}


Thank you.

Thanks, I will test immediately the solution. Just one question: the usage of the pastoptions is related to the copying of format conditions too?

Hi,


Yes, it will copy everything as per MS Excel when copying ranges.

Let us know if you still have the issue,

Thanks

Not working! The test as I wrote it will pass, but the listobjects are in different positions and if you save the wbktmp somewhere as xlsx and try to open it you will notice it is unreadable from excel.


Seems like startrow is not correctly valorized?

Hi,


Thanks for providing us further details.

I can notice the issue as you have mentioned. After using PasteOptions while copying ranges b/w workbooks, it works fine but when I opened the generated file into MS Excel, I got the error: “Excel found unreadable content…”.

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

Once we have any update on it, we will let you know here.

Thank you.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We have fixed the issue.

Please download and try this fix: Aspose.Cells for .NET (Latest Version) and let us know your feedback.

Hi,


Please find attached and try our latest fix/version: Aspose.Cells for .NET v7.4.2.1 (compiled on .NET 2.x and targeted for any CPU with any of the normal .NET framework versions greater than or equal to 2.x (i.e. 2.x, 3.0, 3.5, 4.0, 4.5 etc.)).

We have fixed the issue. Let us know your feedback.

Thank you.

Hello,

I tested and the specific case is resolved, but when I use it with the more extended case that we are using inside, other problem arises.

I extended the example posted at https://docs.google.com/a/vizubi.com/file/d/0B-EFyDLlJnAsNkhaX0RhY2NKT00/edit

This examples generates 4 output and each of them present different problems.

Just to be clear I noticed that the ClearRange (for which I created a switch in the code as you can see in the method ExtendedTemplate) doesn’t delete the ListObjects (or better, it deletes just one of the two).

Moreover all the four outputs when you open with excel they have WRONG content inside.

Hi,


Thanks for sharing the new project.

After an initial test, I can notice the issue by using your new project. The issue seems to be related to List Object / Table which is somehow not rendered fine. I can generate the files fine though. After opening each of the four files, MS Excel will display a message “Excel found unreadable content…” and has to repair it to finally view the file ino it. The tables / listobjects are also not rendered fine with data.
I have reopened your existing issue “CELLSNET-41514”. We will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.

Thanks, can you made them look also into the fact that the ClearRange doesn’t clear one of the list objects?

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We have fixed the issue i.e CELLSNET-41514.

Please download and try this fix: Aspose.Cells for .NET (Latest Version) Client Profile and let us know your feedback.

Ok, I tested in our software and it works! Wonderful!!!


Thank you,
Tommaso Ercole

Hi,

Thanks for your feedback and using Aspose.Cells.

We are pleased to know that your issue is resolved with the latest version. If you find any other issue, please feel free to post, we will be glad to help you more.

Ok, I did more accurate tests and all the problems about unreadable content or copy of range are solved.


I uploaded a new test that does a bit more: https://docs.google.com/file/d/0B-EFyDLlJnAsNkhaX0RhY2NKT00/edit

In the template I added a formula in the tables and in the output I would expect to see the formula espanded for all the length of the table resized as excel is doing when you resize with the mouse a ListObject. This doesn’t happen.

I don’t consider this thing part of this bug, but I would like the behaviour to be replicated in aspose too.
Is this possible?

For the rest I must say I have been really satisfied with the support I received.



Hi,


Good to know that your previous issues are resolved.

For your new issue, I can notice the issue as you have mentioned by running your newly attached project with v7.4.2.3 (latest fix). The formula is not expanded properly for all the length of the table which should be resized as MS Excel.

I have logged in a separate ticket with id “CELLSNET-41543” for the issue. We will look into your issue soon.

Once we have any update on it, we will let you know here.

Thank you.

The issues you have found earlier (filed as CELLSNET-41514) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Amjad Sahi:
Hi,

Good to know that your previous issues are resolved.

For your new issue, I can notice the issue as you have mentioned by running your newly attached project with v7.4.2.3 (latest fix). The formula is not expanded properly for all the length of the table which should be resized as MS Excel.

I have logged in a separate ticket with id "CELLSNET-41543" for the issue. We will look into your issue soon.

Once we have any update on it, we will let you know here.

Thank you.

Hello,
do you have any news about the separeted ticket CELLSNET-41543

Thanks,
Tommaso

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We have checked your issue status, it is still unresolved. However, we have logged your comment in our database. Once, there is some update for you, we will let you know asap.

Hi,


Could you please try our latest fix/version: Aspose.Cells for .NET (Latest Version)

Let us know your feedback if the issue is resolved now.

Thank you.