Changing the text of an existing WordArt in an Excel file

Hi,

I have an Excel file, called 'model.xlsx' and there is only a WordArt in it, containing the text 'text to replace'.

What I would like to do is changing the text oh this WordArt and saving it into a new file. Here is the way I'm doing it :

import com.aspose.cells.FileFormatType;
import com.aspose.cells.RectangleShape;
import com.aspose.cells.Workbook;
import com.aspose.cells.Worksheet
public class test {
public static void main(String[] args) throws Exception {
Workbook wb = new Workbook("C:\\model.xlsx");
Worksheet ws = wb.getWorksheets().get(0);
RectangleShape rs = (RectangleShape) ws.getShapes().get(0);
rs.setText("new text");
wb.save("C:\\newmodel.xlsx", FileFormatType.XLSX);
}
}

The text is replaced but there is no WordArt anymore, the text is now a simple black text. I tried to search in the TextEffectFormat and MsoTextFrame but found nothing.

I tried to save the text format before changing it, and set the format after but I didn't managed to do that neither.

I'm using Aspose.Cells for Java 7.1.0 and a 1.4 JRE, on Windows XP.

Best Regards,

Hasan.

Sorry triple post I don’t know how I’ve done that.

Hi Hasan,


It’s Ok. We have replied to your earlier post. Please download and use the latest version: Aspose.Cells for Java v7.3.0 and let us know your feedback.

BekciHasan:

Hi,

I have an Excel file, called 'model.xlsx' and there is only a WordArt in it, containing the text 'text to replace'.

What I would like to do is changing the text oh this WordArt and saving it into a new file. Here is the way I'm doing it :

import com.aspose.cells.FileFormatType;
import com.aspose.cells.RectangleShape;
import com.aspose.cells.Workbook;
import com.aspose.cells.Worksheet
public class test {
public static void main(String[] args) throws Exception {
Workbook wb = new Workbook("C:\\model.xlsx");
Worksheet ws = wb.getWorksheets().get(0);
RectangleShape rs = (RectangleShape) ws.getShapes().get(0);
rs.setText("new text");
wb.save("C:\\newmodel.xlsx", FileFormatType.XLSX);
}
}

The text is replaced but there is no WordArt anymore, the text is now a simple black text. I tried to search in the TextEffectFormat and MsoTextFrame but found nothing.

I tried to save the text format before changing it, and set the format after but I didn't managed to do that neither.

I'm using Aspose.Cells for Java 7.1.0 and a 1.4 JRE, on Windows XP.

Best Regards,

Hasan.

Hi,

I was able to replicate your issue on Windows XP. Please refer to the following post: 399043, I have attached the source file, output file and screenshot for your reference.

Also, we have logged this issue in our database so that it could be fixed.
Hi,

We are pleased to inform you that we have fixed the issue logged earlier as "CELLSJAVA-40260". We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

Keep in touch.

Thank you.

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


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