Combine with charts causing plot area mismatch

I am trying to combine multiple workbooks into a single workbook. The source workbooks contain charts. When I combine the workbooks, the combined charts plotarea doesn’t match. I can reproduce this issue consistently.

Workbook oDest = new Workbook();
oDest.Open(“c:\sourcebook.xls”);
Workbook oSource2 = new Workbook();
oSource2.Open(“c:\sourcebook.xls”);
oDest.Combine(oSource2);
oDest.Combine(oSource2);

oDest.Combine(oSource2);

oDest.Save(“c:\destbook.xls”, FileFormatType.Excel97To2003);

The first copy of sheet in destbook.xls looks the same as the original sourcebook.xls, but the second and subsequent sheets have a large gap between the title and the plot area. I have checked the values stored in the structure in visual studio 2010 debugger and the plot area looks OK.

I’m using Aspose Cells .NET 5.0.0.0.

I’ve attached a copy of sourcebook.xls for support to review.

Can you help?

Shane

Hi,

I have tested your issue and I am able to reproduce the issue using your sample code and template file.

I have logged your issue into issue tracking system with an id: CELLSNET-18673.

We will figure your issue out soon.

Thank you.

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

This fixed the initial issue, but unfortunately it has introduced another (or one of the other fixes has). My charts have colored Major Axis Gridlines which are being lost (reverting to automatic). If you simply take my sample chart and format the gridlines, set the line color to turquoise (or anything else) and then run the code I sent, all charts in the output workbook will have lost the color. Therefore this isn’t an issue with the combine, as even the first workbook opened has the issue.

Regards

Shane

Hi Shane,

Well, if you set the colors in MS Excel 2007 and save the file, we do not support custom colors in XLS file of Excel 2007. This is not a bug but we do not support this feature yet. We will support this feature soon.

Also, we have found an issue of setting color to major grid lines, we have added it into our issue tracking system with an id: CELLSNET-18848. We will figure out the issue soon.

Thank you.

Hi,

We have fixed the issue of Gridlines’ color.

Please try the attached version.

Thank you.

Thanks again, that fixed the issue. Next issue though, will keep this thread running if that’s OK.



The attached excel file has issues when combined.


  1. The font rotation, size and color is lost on the first and last bars on the chart.
  2. The category labels end up rotated.



    The font change seems to occur on save. The category labels rotate on
    combine and is caused by the long text label. Same code as I first posted will show issues. Let me know if
    any questions or if you can’t reproduce.



    Shane

Hi,

Thanks for providing us the sample file.

After an initial test, I can find the issues as you have mentioned. We will figure it out soon.

I have logged your issue into our issue tracking system with an id: CELLSNET-19021. Once it is resolved, we will let you know about it.


Thank you.

Thanks again! I have one more that I haven’t been able to do a demo of as can’t reproduce except for production templates which I don’t want to send due to sensitive data. I’ll keep working on it, but wondering in the mean time whether you are you aware of any reasons why named ranges wouldn’t be copied during a combine? Is there a limitation to how many named ranges can be copied? There are lots in the one that is failing (> 60).


Regards

Shane

Hi Shane,

Well, I checked in the combined workbook, the “Category_1” and “Category_2” named ranges in your source book are copied into all the worksheets (in worksheet level) after combine operation.

We appreciate if you could create a sample application to show the issue, we can check it soon.

Thank you.

Sample as requested. The second sheet has 12 named ranges. When I combine and save, the named ranges aren’t copied to the new sheet.

Hi,

Thanks for the file,


Which tools do you use to create this file? We found some very strange recorded data in the file.

Anyways we will fix this issue soon.


Thank you.

It was created with Excel 2003. Hasn’t been touched otherwise to the best of my knowledge, but it was probably based on another document and has had things copied/pasted between. I’ve deleted lots of content including charts and images.

Hi,

Please try the attached version. We have fixed the issue of copying named ranges in combining workbook.


Thank you.
<span style=“font-size: 11pt; font-family: “Calibri”,“sans-serif”; color: rgb(31, 73, 125);”><o:p></o:p>


Hi Amjad


This version fixes the combined named ranges, but all the images in my documents are now broken. They appear as a red cross in a black border. It didn’t happen when I dropped a copy of the image into the test file I send you, but I haven’t seen this with any previous version of your tool. Any ideas?

Thanks

Shane

Hi Shane,

Kindly post your input, output files with sample code here, we will check your issue soon.

Thank you.

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.