Resizing tables changes format of cells

Hi,

Using the latest version v18.9.4 I found a new bug concerning resizing tables. It worked in 18.3.

It changes format of cells after resizing table over those cells:

Before resize:
grafik.png (5.2 KB)

After resize (With Aspose): Not ok
grafik.png (5.2 KB)

After resize (With Excel): Ok
grafik.png (5.2 KB)

Documents:
ResizeTable.zip (26.3 KB)

Code to reproduce:

	private static void Test_ResizeTable()
	{
		const string srcFilePath = @"ResizeTable\BeforeResize.xlsm";
		const string tgtFilePath = @"ResizeTable\AfterResize.xlsm";

		Workbook wbSource = new Workbook(srcFilePath);
		Worksheet sheet = wbSource.Worksheets["Tabelle1"];

		ListObject table = sheet.ListObjects[0];

		table.Resize(table.StartRow, table.StartColumn, sheet.Cells.MaxDataRow, sheet.Cells.MaxDataColumn, true);

		wbSource.Save(tgtFilePath);
	}

I am using .Net 4.0 version.

@IT_Helpdesk,

We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNET-46375 - Resizing tables changes format of cells

@IT_Helpdesk,

This is to inform you that we have fixed your issue now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

Once the fix is available for public use, we will share the Download link here.

@IT_Helpdesk,

Please try our latest version/fix: Aspose.Cells for .NET v18.9.5

Your issue should be fixed in it.

Let us know your feedback.

Hi,

This fix works fine.

I generated a workbook once and saw copiing columns with did not work properly (Cells with more than one format in it had a completely different text in it):

Range sourceRange = sheetSrc.Cells.CreateRange(0, 10, true);
Range destRange = sheetTgt.Cells.CreateRange(0, 10, true);
PasteOptions options = new PasteOptions
{
	PasteType = PasteType.All
};
destRange.Copy(sourceRange, options);

Source:
grafik.png (2.3 KB)
Target:
grafik.png (1.3 KB)

But i cannot reproduce it. It just worked after the second run.
I want to inform you that i might create a new topic, but there is nothing to do for you now.

@IT_Helpdesk,

Good to know that your issue is sorted out by latest fix. 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.

The issues you have found earlier (filed as CELLSNET-46375) have been fixed in Aspose.Cells for .NET v18.10. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi

I’m evaluating Aspose.Cells for Java 22.10 and seem to have encountered this same issue. Can you check to see if this fix has been applied on the Java version? Whenever I resize a ListObject, it changes the font to bold.

@dmthornton,

Could you please share sample code (runnable) and template file(s) to reproduce the issue on our end. We will check your issue soon.

Pictures of the before/after cells
before.jpg (45.6 KB)
after.jpg (47.3 KB)

Before and after spreadsheets
sample.zip (15.7 KB)

Code to reproduce

public static void main(String[] args) {
  try {
    Workbook workbook = new Workbook("sample_before_b.xlsx");
    Worksheet worksheet = workbook.getWorksheets().get(0);
    ListObject lstObj = worksheet.getListObjects().get("Table1");
    
    lstObj.resize(1, 0, 5, 5, false);
    try {
      workbook.save("sample_after_b.xlsx");
    }
    catch (Exception e) {
      e.printStackTrace();
    }
  }
  catch (Exception e) {
    e.printStackTrace();
  }
}

@dmthornton,

Thanks for the sample files and screenshots.

Please notice, I am able to reproduce the issue as you mentioned by using your template file and sample. I found when resizing tables, it changes formatting of cells. I have logged a ticket with an id “CELLSJAVA-44944” for your issue. We will look into it soon.

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

Cool, thanks a lot for your help and quick response. It feels almost strange these days to experience this kind of customer service (paid or for free), so this is highly appreciated!

@dmthornton,

You are welcome.

@dmthornton,

This is to inform you that your issue has been resolved now. The fix will be included in our upcoming release (Aspose.Cells v22.11) which is scheduled in the first half of November, 2022. You will also be notified when the next version is released.

That’s awesome, thanks for the update!

@dmthornton,

You are welcome.

The issues you have found earlier (filed as CELLSJAVA-44944) have been fixed in this update. This message was posted using Bugs notification tool by Peyton.Xu