I need to change the text in the Shape and keep its style but when I run the code below style always changes. Is there a way to keep the style of the text?
We have tested this issue with the latest version: Aspose.Cells for Java v8.8.2.6
using your source excel file and sample code and found that the latest version throws exception.
However, we were able to achieve your output using the following sample code. You may try it at your end and use it as a workaround.
I have also attached the output excel file generated with this code for your reference
C#
Workbook workbook = new Workbook(dirPath + “Test.xlsx”);
We have also fixed your main issue which was logged in our database as CELLSNET-44522. We will soon port the fix in Java version too and provide it to you after performing QA and including other enhancements and fixes.
Thank you for writing back. I have reevaluated the presented scenario while using the latest version of Aspose.Cells for Java 16.11.6, and I am not able to observe the said issue, that is; text in the shape has been changed without affecting the style. Could you please give a try to the latest version (attached) and share your feedback? In case the problem persists, please provide us your environment details as follow.
Operating system version & architecture
JDK vendor, version & architecture
JVM arguments, if any
Locale of your machine
Input spreadsheet, if different than what you have already shared in this thread.
I switched to Aspose.Cells for Java 16.11.6 and the issue still persists. Even if I open the file you attached in the previous post - TestXX.xlsx, I can see the difference in MS Excel. It looks like gradient outline width is not the same.
Please find attached source file, target file and screenshot with the highlighted difference.
Here are the environment details:
Operating system version & architecture:
Ubuntu 14.04 LTS x64
JDK vendor, version & architecture:
java version "1.8.0_101"
Java™ SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot™ 64-Bit Server VM (build 25.101-b13, mixed mode)
We have tested your issue with the following sample code using the latest version: Aspose.Cells for Java v16.11.6 and observe the issue as per your screenshot.
We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as
CELLSJAVA-42085 - Setting the shape text changes the text style
This is to update you that your ticket logged earlier as “CELLSJAVA-42085” has been resolved. We will soon share the fix here for your testing after performing QA and incorporating other enhancements and fixes.
It is good to know that your issue is resolved with the latest fix. Let us know if you encounter any other issue, we will be glad to look into it and help you further.