Reflection, Shadow, Glow & 3D Effects for Shapes and Built-in Styles for WordArt Supported in Aspose.Cells for .NET 16.10.0

Share on FacebookTweet about this on TwitterShare on LinkedIn

Aspose.Cells for .NET logoWe are pleased to announce our next version of Aspose.Cells for .NET v16.10.0. This release includes many new features and other enhancements with some critical bug fixes. Please see the release notes in order to know what is new and what has been changed/fixed with this version of Aspose.Cells for .NET. If you are planning to upgrade the Aspose.Cells for .NET API to the latest revision, we would strongly suggest you to check the complete Public API Changes section to know what APIs are changed so far. We have highlighted some important features and other enhancements here.

Support for Reflection Effects

Aspose.Cells for .NET 16.10.0 has added the support for reflection effects for a Shape object as Excel provides it via Effects tab under Format Shape dialog as shown below.

In order to provide the said feature, Aspose.Cells for .NET 16.10.0 has exposed the ReflectionEffect class along with Shape.Reflection property which together controls the reflection effects of a Shape object.

Here is a simple usage scenario of newly exposed APIs to apply reflection on an existing shape, whereas a detailed article can be viewed on Working with Reflection Effects for Shapes.

//Load your source excel file
Workbook wb = new Workbook("sample.xlsx");

//Access first worksheet
Worksheet ws = wb.Worksheets[0];

//Access first shape
Shape sh = ws.Shapes[0];

//Set the reflection effect of the shape
//Set its Blur, Size, Transparency and Distance properties
ReflectionEffect re = sh.Reflection;
re.Blur = 30;
re.Size = 90;
re.Transparency = 0;
re.Distance = 80;

//Save the workbook in xlsx format
wb.Save("output.xlsx");

Support for Shadow Effects

Aspose.Cells for .NET 16.10.0 has added the support for Shadow Effects for a Shape object as Excel provides it via Effects tab under Format Shape dialog as shown below.

Aspose.Cells for .NET 16.10.0 has exposed the Shape.ShadowEffect property along with ShadowEffect class which together allows to set the shadow effect on a Shape object.

Here is a simple usage scenario of newly exposed APIs to apply shadow on an existing shape, whereas a detailed article can be viewed on Working with Shadow Effects for Shapes.

//Load your source excel file
Workbook wb = new Workbook("sample.xlsx");

//Access first worksheet
Worksheet ws = wb.Worksheets[0];

//Access first shape
Shape sh = ws.Shapes[0];

//Set the shadow effect of the shape
//Set its Angle, Blur, Distance and Transparency properties
ShadowEffect se = sh.ShadowEffect;
se.Angle = 150;
se.Blur = 4;
se.Distance = 45;
se.Transparency = 0.3;

//Save the workbook in xlsx format
wb.Save("output.xlsx");

Support for Glow Effects

Aspose.Cells for .NET now supports the Glow Effects for a Shape object as Excel provides it via Effects tab under Format Shape dialog as shown below.

Aspose.Cells for .NET 16.10.0 has exposed the Shape.Glow property along with GlowEffect class which together allows to set the glow effect on a Shape object.

Here is a simple usage scenario of newly exposed APIs to apply glow effect on an existing shape, whereas a detailed article can be viewed on Working with Glow Effects for Shapes.

//Load your source excel file
Workbook wb = new Workbook("sample.xlsx");

//Access first worksheet
Worksheet ws = wb.Worksheets[0];

//Access first shape
Shape sh = ws.Shapes[0];

//Set the glow effect of the shape
//Set its Size and Transparency properties
GlowEffect ge = sh.Glow;
ge.Size = 30;
ge.Transparency = 0.4;

//Save the workbook in xlsx format
wb.Save("output.xlsx");

Support for 3-D Formats

Aspose.Cells for .NET supports the 3D Formats for Shape objects as MS Excel provides it via Effects tab under Format Shape dialog as shown below.

Aspose.Cells for .NET 16.10.0 has exposed the Shape.ThreeDFormat property along with ThreeDFormat class which together allows to set the 3D formatting for a Shape object.

Here is a simple usage scenario of newly exposed APIs to apply 3D formatting on an existing shape, whereas a detailed article can be viewed on Working with 3-D Formats for Shapes.

//Load excel file containing a shape
Workbook wb = new Workbook("sample.xlsx");

//Access first worksheet
Worksheet ws = wb.Worksheets[0];

//Access first shape
Shape sh = ws.Shapes[0];

//Apply different three dimensional settings
ThreeDFormat n3df =  sh.ThreeDFormat;
n3df.ContourWidth = 17;
n3df.ExtrusionHeight = 32;

//Save the output excel file in xlsx format
wb.Save("output.xlsx");

Support for WordArt Built-in Styles

Aspose.Cells for .NET APIs now support to add WordArt objects with built-in styles. In order to provide this feature, the Aspose.Cells for .NET APIs have exposed the ShapeCollection.AddWordArt method along with PresetWordArtStyle enumeration which together allows to add preset WordArt objects since MS Excel 2007.

Here is a simple usage scenario of newly exposed APIs to add WordArt with build-in styles, whereas a detailed article can be viewed on Working with Built-in Styles for WordArt.

//Create workbook object
Workbook wb = new Workbook();

//Access first worksheet
Worksheet ws = wb.Worksheets[0];

//Add Word Art Text with Built-in Styles
ws.Shapes.AddWordArt(PresetWordArtStyle.WordArtStyle1, "Aspose File Format APIs", 00, 0, 0, 0, 100, 800);
ws.Shapes.AddWordArt(PresetWordArtStyle.WordArtStyle2, "Aspose File Format APIs", 10, 0, 0, 0, 100, 800);
ws.Shapes.AddWordArt(PresetWordArtStyle.WordArtStyle3, "Aspose File Format APIs", 20, 0, 0, 0, 100, 800);
ws.Shapes.AddWordArt(PresetWordArtStyle.WordArtStyle4, "Aspose File Format APIs", 30, 0, 0, 0, 100, 800);
ws.Shapes.AddWordArt(PresetWordArtStyle.WordArtStyle5, "Aspose File Format APIs", 40, 0, 0, 0, 100, 800);

//Save the workbook in xlsx format
wb.Save("output.xlsx");

Automatic Propagation of Formula in ListObject

Microsoft Excel application allows the automatic proprgation of formulas when new rows are inserted to a ListObject/Table. Aspose.Cells now provides the same feature by exposing the ListColumn.Formula property with this release

Here is a simple usage scenario of ListColumn.Formula property, whereas a detailed article can be viewed on Automatically Propagate Formula in ListObject.

//Create workbook object
Workbook book = new Workbook();

//Access first worksheet
Worksheet sheet = book.Worksheets[0];

//Add column headings in cell A1 and B1
sheet.Cells[0, 0].PutValue("Column A");
sheet.Cells[0, 1].PutValue("Column B");

//Add list object, set its name and style
ListObject listObject = sheet.ListObjects[sheet.ListObjects.Add(0, 0, 1, sheet.Cells.MaxColumn, true)];
listObject.TableStyleType = TableStyleType.TableStyleMedium2;
listObject.DisplayName = "Table";

//Set the formula of second column so that it propagates to new rows automatically while entering data
listObject.ListColumns[1].Formula = "=[Column A] + 1";

//Save the workbook in xlsx format
book.Save("output.xlsx");

Other Enhancements and Fixes

Aspose.Cells for .NET 16.10.0 has fixed a few critical bugs as well as enhanced its core for more stability. A few of the worth mentioning enhancements are as follow.

In this release, several important issues have been addressed. For example, issues around reading and rendering to Excel and HTML file formats, adding List Objects/ Tables, conditional formatting, manipulating shapes, manipulating internal and external links, manipulating PivotTables, rendering images from Excel worksheets, rendering images files from charts and exporting Excel workbooks to PDF format have been resolved.

Aspose.Cells for .NET Resources

The resources, you may need to accomplish your tasks: