Chart disappearing in ODS format

Hello,

Here is an example of a chart disappearing :

1/ I create a blank file in OpenOffice.
2/ I add a column with 5 values, and a chart based on this
empty_with_chart.PNG (11.1 KB)

3/ Then i am running this code :
Workbook wb = new Workbook(@“empty_with_chart.ods”);
Worksheet sheet = wb.Worksheets[0];
Cell cell = sheet.Cells[“A1”];
cell.PutValue(“TEST”);
wb.Save(“MyBook.ods”);

4/ Here is the result :
result.PNG (8.0 KB)

The chart width is 0.01cm, and when i set a bigger width the result is half blue / half white with nothing showing. I have also encountered a case where the chart is not showing at all.

Can someone help me on this subject ? I have tried to parse the sheet and call Calculate on the chart, it has no effect.

ps : I am using the nugget package Aspose.Cells v19.11.0

@vviroleau,
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- 47023 – Chart lost while loading and saving ODS file

@vviroleau,

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

Your issue should be fixed in it.

Let us know your feedback.
Aspose.Cells19.11.4 For .Net2_AuthenticodeSigned.Zip (5.0 MB)
Aspose.Cells19.11.4 For .Net4.0.Zip (5.0 MB)

Hello,

Thanks for your help. Now the chart is showing but i still have 2 errors :

1- If i create a chart of type Line, Points and Lines, it is “transformed” only in line

2- If i create a chart of type XY (Scatter), Points and Lines, it is showing with blue and white and is not usable

19_4_before1.PNG (40.0 KB)
19_4_after1.PNG (39.6 KB)

@vviroleau,

Thanks for the screenshots.

Please provide your sample ODS files (input file and output file), we will check it soon.

PS. please zip the files prior attaching.

I have created an ods file with all the type of diagram.
allDiagrams.zip (190.2 KB)

the c# :
Workbook wb = new Workbook(@“allDiagrams_before.ods”);
Worksheet sheet = wb.Worksheets[0];
Cell cell = sheet.Cells[“A1”];
cell.PutValue(“TEST”);
wb.Save(“allDiagrams_after.ods”);

@vviroleau,
Thank you for providing more information. We will analyse it and provide our feedback accordingly.

@vviroleau,
Please try our latest version/fix: Aspose.Cells for .NET v19.11.6 (attached)

Your issue should be fixed in it.

Let us know your feedback.

Aspose.Cells19.11.6 For .Net2_AuthenticodeSigned.Zip (5.0 MB)
Aspose.Cells19.11.6 For .Net4.0.Zip (5.0 MB)

Hello,

Now the diagrams are displayed, but there are still 10 bugs :

1- Diagram point only is transformed in line only (Sheet2, line 1 diagram 1)
2- Lines and point is transformed in line only (Sheet2, line 1 diagram 2)
3- Line 3D is wrong, the line is not displayed (Sheet2, line 1 diagram 4)
4- XY scatter points only, the points have disappeared (Sheet2, line 2 diagram 1)
5- XY scatter points and line is transform in XY scatter line only (Sheet2, line 2 diagram 2)
6- XY scatter 3D lines is wrong, the line is not showing (Sheet2, line 2 diagram 4)
7- Net points only is wrong, the points are not showing (Sheet2, line 4 diagram 1)
8- Net points and line is transformed in line only (Sheet2, line 4 diagram 2)
9- Net filled is completely different, it’s like it has been transformed in bar ? (Sheet2, line 4 diagram 4)
10- All Line, XY scatter and net diagram have a different font after the save.
The line is thicker and the color has changed. (Sheet2, line 1, 2 and 4)

@vviroleau,

Thanks for providing us details.

We noticed mostly your mentioned issues but a few ones are not confirmed. I simply opened your sample ODS file and re-saved it using the following sample code:
e.g
Sample code:

Workbook wb = new Workbook("e:\\test2\\allDiagrams_before.ods");
            wb.Save("e:\\test2\\out1.ods");

The following issues are not confirmed/reproduced precisely:
2- Lines and point is transformed in line only (Sheet2, line 1 diagram 2)
4- XY scatter points only, the points have disappeared (Sheet2, line 2 diagram 1)
5- XY scatter points and line is transform in XY scatter line only (Sheet2, line 2 diagram 2)
8- Net points and line is transformed in line only (Sheet2, line 4 diagram 2) _
9- Net filled is completely different, it’s like it has been transformed in bar ? (Sheet2, line 4 diagram 4)
10- All Line, XY scatter and net diagram have a different font after the save.

We appreciate if you could provide some screenshots to highlight the above mentioned issues while comparing charts in input ODS file Vs output ODS file in openoffice. After receiving these details and artifacts, we will log appropriate tickets for the issues.

Hello,

My c# :
Workbook wb = new Workbook(@“allDiagrams_before.ods”);
Worksheet sheet = wb.Worksheets[0];
Cell cell = sheet.Cells[“A1”];
cell.PutValue(“TEST”);
wb.Save(@“allDiagrams_after.ods”);

Here are the screenshots :
point2_10.zip (672.6 KB)

Thank you

@vviroleau,

I could not find your mentioned issues (as per your screenshots). Actually I find a different display when opening input ODS file into openoffice (OpenOffice.org v3.2). I have captured some screenshots to compare those charts from input ODS Vs output ODS (via Aspose.Cells) into openoffice for your reference:
https://i.imgur.com/uxrF2MP.png
https://i.imgur.com/oLA7bhe.png
https://i.imgur.com/BgTGX3b.png

You can clearly see there is not much difference b/w input and output charts.

I have also attached the input file and output file (using your sample code with v19.11.6) for your reference.
files1.zip (190.8 KB)

When i open your outallDiagrams_after.ods it is ok.
So i don’t understand why it is working on your side !!

Can you confirm you are using asposecell for .net,
modified the 02/12/2019 at 02:57 ?

asposecell_19_11_6_0.PNG (45.6 KB)

@vviroleau,

Thanks for the screenshot.

Yes, I am using the same version (i.e., Aspose.Cells for .NET v19.11.6). I even printed the version in the code (at the start), i.e.,

Console.WriteLine(CellsHelper.GetVersion());

it gives correct version number:
19.11.6

If you still find these issues (as per your screenshots), we appreciate if you could create a standalone console demo application with v19.11.6, zip the project and provide us here to reproduce the issue, we will check it soon.

the output exec :
aspose.zip (5.0 MB)

the project :
aspose_example_dotnet.PNG (89.6 KB)

the source : (using visual studio 16.3.10)
ConsoleApp1.zip (4.8 MB)

@vviroleau,

I used your project to open into VS.NET and executed it (with v19.11.6) and it works fine, see the screenshot when running:
https://i.imgur.com/BzqtJwj.png

I have attached the output file for your reference. Please open it and see if you see those issues or not.
file.zip (54.7 KB)

This is strange that you are seeing this issue where as I could not find those issues (I could only notice 1,3 and 7 issues) on my pc (os: Windows8, openoffice.org 3 (v3.2.0), etc.). Also see the screenshot of the openoffice version that I am using:
https://i.imgur.com/BgTGX3b.png

What is your environment, please provide complete details about your environment. Also attach your output file by Aspose.Cells for .NET v19.11.6 which is generated when executing your project with your input ODS file.

Ok, i have unzip my wrong ODS file and your good ODS file, and for example in the folder
Object 0_0, the file content.xml has a difference (a coma instead of a point)
regional_point_or_coma.PNG (65.5 KB)

I am under windows 10 but in France.
Can you please change your regional settings to France and see if you can reproduce ?
region.PNG (99.9 KB)

@vviroleau,

Thanks for the screenshots.

Yes, I noticed (I tested the code after changing regional settings to France) this is due to your regional settings in your environment. Could you try to add a line to your code before re-saving ODS file.
e.g
Sample code:

.......
    wb.Settings.Region = CountryCode.USA;
    .........

Let us know if you still see the issue.

No, it does not change anything.

@vviroleau,

Could you share the screenshot for input ODS file when opening into openoffice in your environment.