Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Cells 16.10.0 has exposed the ReflectionEffect class along with the Shape.Reflection property in order to control the reflection effects of a Shape object. The ReflectionEffect class has the following properties.
Here is a simple usage scenario of the Shape.Reflection property.
Java
//Load a sample spreadsheet containing a shape
//Alternatively create a new spreadsheet and add a shape
Workbook book = new Workbook("sample.xlsx");
//Access first worksheet from the collection
Worksheet sheet = book.getWorksheets().get(0);
//Access first shape from the collection
Shape shape = sheet.getShapes().get(0);
//Get the instance of ReflectionEffect from the Shape object
ReflectionEffect reflection = shape.getReflection();
//Set its Blur, Size, Transparency and Distance properties
reflection.setBlur(30);
reflection.setSize(90);
reflection.setTransparency(0.5);
reflection.setDistance(80);
//Save the result in XLSX format
book.save("output.xlsx");
Aspose.Cells 16.10.0 has exposed the Shape.ShadowEffect property along with the ShadowEffect class, which altogether allows you to set the shadow effect on a Shape object. The ShadowEffect class has the following properties.
Here is a simple usage scenario of the aforementioned property.
Java
//Load a sample spreadsheet containing a shape
//Alternatively create a new spreadsheet and add a shape
Workbook book = new Workbook("sample.xlsx");
//Access first worksheet from the collection
Worksheet sheet = book.getWorksheets().get(0);
//Access first shape from the collection
Shape shape = sheet.getShapes().get(0);
//Get the instance of ShadowEffect from the Shape object
ShadowEffect shadow = shape.getShadowEffect();
//Set its Angle, Blur, Size, Transparency and Distance properties
shadow.setAngle(150);
shadow.setBlur(30);
shadow.setSize(90);
shadow.setTransparency(0.5);
shadow.setDistance(80);
//Save the result in XLSX format
book.save("output.xlsx");
Aspose.Cells 16.10.0 has exposed the Shape.Glow property along with the GlowEffect class, which altogether allows you to set the glow effect of a Shape object. The GlowEffect class specifies a glow effect, in which a color‑blurred outline is added outside the edges of the object using the following properties.
Here is a simple usage scenario of the Shape.Glow property.
Java
//Load a sample spreadsheet containing a shape
//Alternatively create a new spreadsheet and add a shape
Workbook book = new Workbook("sample.xlsx");
//Access first worksheet from the collection
Worksheet sheet = book.getWorksheets().get(0);
//Access first shape from the collection
Shape shape = sheet.getShapes().get(0);
//Get the instance of GlowEffect from the Shape object
GlowEffect glow = shape.getGlow();
//Set its Size & Transparency properties
glow.setSize(90);
glow.setTransparency(0.5);
//Save the result in XLSX format
book.save("output.xlsx");
Aspose.Cells 16.10.0 has exposed the Shape.ThreeDFormat property along with the ThreeDFormat class, which together can be used to control the 3D formatting of the Shape object. The ThreeDFormat class represents a shape’s three‑dimensional formatting and has the following properties.
Following is a simple usage scenario of the Shape.ThreeDFormat property.
Java
//Load a sample spreadsheet containing a shape
//Alternatively create a new spreadsheet and add a shape
Workbook book = new Workbook("sample.xlsx");
//Access first worksheet from the collection
Worksheet sheet = book.getWorksheets().get(0);
//Access first shape from the collection
Shape shape = sheet.getShapes().get(0);
//Get the instance of ThreeDFormat from the Shape object
ThreeDFormat threeD = shape.getThreeDFormat();
//Set its ContourWidth & ExtrusionHeight properties
threeD.setContourWidth(15);
threeD.setExtrusionHeight(30);
//Save the result in XLSX format
book.save("output.xlsx");
Aspose.Cells 16.10.0 has exposed the FontSettingCollection.setWordArtStyle & FontSetting.setWordArtStyle methods in order to set the preset WordArt style to the text of the Shape object.
Here is a simple usage scenario of the aforementioned methods.
Java
//Create workbook object
Workbook book = new Workbook();
//Access first worksheet from the collection
Worksheet sheet = book.getWorksheets().get(0);
//Create a TextBox with some text
int index = sheet.getTextBoxes().add(0, 0, 100, 700);
TextBox textBox = (TextBox)sheet.getShapes().get(index);
textBox.setText("Aspose File Format APIs");
textBox.getFont().setSize(44);
//Set preset WordArt style to the text of the shape
FontSetting fntSetting = (FontSetting)textBox.getCharacters().get(0);
fntSetting.setWordArtStyle(PresetWordArtStyle.WORD_ART_STYLE_15);
Aspose.Cells 16.10.0 has exposed the ShapeCollection.addWordArt method along with the PresetWordArtStyle enumeration in order to provide support for adding preset WordArt objects since Excel 2007.
Here is a simple usage scenario of the ShapeCollection.addWordArt method.
Java
//Create an instance of Workbook
Workbook book = new Workbook();
//Access first worksheet from the collection
Worksheet sheet = book.getWorksheets().get(0);
//Access ShapeCollection of first worksheet
ShapeCollection shapes = sheet.getShapes();
//Add WordArt with built‑in styles
shapes.addWordArt(PresetWordArtStyle.WORD_ART_STYLE_1, "Aspose File Format APIs", 0, 0, 0, 0, 100, 800);
shapes.addWordArt(PresetWordArtStyle.WORD_ART_STYLE_2, "Aspose File Format APIs", 10, 0, 0, 0, 100, 800);
shapes.addWordArt(PresetWordArtStyle.WORD_ART_STYLE_3, "Aspose File Format APIs", 20, 0, 0, 0, 100, 800);
shapes.addWordArt(PresetWordArtStyle.WORD_ART_STYLE_4, "Aspose File Format APIs", 30, 0, 0, 0, 100, 800);
shapes.addWordArt(PresetWordArtStyle.WORD_ART_STYLE_5, "Aspose File Format APIs", 40, 0, 0, 0, 100, 800);
//Save the result in XLSX format
book.save("output.xlsx");
Aspose.Cells has exposed the XmlMapCollection.add method that allows adding an XML Map to a spreadsheet. Here is a simple usage scenario of the XmlMapCollection.add method.
Java
//Create an instance of Workbook
Workbook book = new Workbook();
//Add XML map from the sample.xml to the workbook
book.getWorksheets().getXmlMaps().add("sample.xml");
Aspose.Cells has now exposed the Cells.linkToXmlMap method in order to link cells with the XML map elements. Here is a simple usage scenario of the Cells.linkToXmlMap method.
Java
//Load a sample spreadsheet in an instance of Workbook
Workbook book = new Workbook("sample.xlsx");
//Access the XML Map from the spreadsheet
XmlMap map = book.getWorksheets().getXmlMaps().get(0);
//Access first worksheet from the collection
Worksheet sheet = book.getWorksheets().get(0);
//Map FIELD1 and FIELD2 to cell A1 and B2
sheet.getCells().linkToXmlMap(map.getName(), 0, 0, "/root/row/FIELD1");
sheet.getCells().linkToXmlMap(map.getName(), 1, 1, "/root/row/FIELD2");
//Map FIELD4 and FIELD5 to cell C3 and D4
sheet.getCells().linkToXmlMap(map.getName(), 2, 2, "/root/row/FIELD4");
sheet.getCells().linkToXmlMap(map.getName(), 3, 3, "/root/row/FIELD5");
//Map FIELD7 and FIELD8 to cell E5 and F6
sheet.getCells().linkToXmlMap(map.getName(), 4, 4, "/root/row/FIELD7");
sheet.getCells().linkToXmlMap(map.getName(), 5, 5, "/root/row/FIELD8");
Aspose.Cells 16.10.0 has exposed the ListColumn.formula property in order to automatically propagate the formula to newly inserted rows.
Here is a simple usage scenario of the ListColumn.formula property.
Java
//Create an instance of Workbook
Workbook book = new Workbook();
//Access first worksheet from the collection
Worksheet sheet = book.getWorksheets().get(0);
//Add column headings in cell A1 and B1
sheet.getCells().get(0, 0).putValue("Column A");
sheet.getCells().get(0, 1).putValue("Column B");
//Add list object, set its name and style
ListObject listObject = sheet.getListObjects().get(sheet.getListObjects().add(0, 0, 1, sheet.getCells().getMaxColumn(), true));
listObject.setTableStyleType(TableStyleType.TABLE_STYLE_MEDIUM_14);
listObject.setDisplayName("Table");
//Set the formula of the second column so that it automatically propagates to new rows while entering data
listObject.getListColumns().get(1).setFormula("=[Column A] + 1");
//Save the result in XLSX format
book.save("output.xlsx");
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.