Query Cell Areas Mapped to XmlMap Path, Render Limited No Of Sequential Pages and Ignore Errors while Rendering Excel to PDF with Aspose.Cells for Java 17.11

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Aspose.Cells for JavaWe are pleased to announce the release of Aspose.Cells for Java 17.11. This release includes many new features and enhancements along with some critical bug fixes that further improve the overall stability of the APIs. We also recommend our clients to use the powerful Aspose for Java APIs directly in their Maven Projects with simple configurations. Please check the release notes in order to get an idea about what is new and what has been fixed with this revision of Aspose.Cells for Java. Here is a look at the major features in this release.

Find the root element name of Xml Map

Aspose.Cells allows you to find the root element name of XML map using XmlMap.RootElementName property. For more detail, please see this article.

Query Cell Areas Mapped to Xml Map Path

You can query cell areas mapped to xml map path with Aspose.Cells using the Worksheet.xmlMapQuery() method. If the path exists, it will return the list of cell areas related to that path inside xml map. The first parameter of Worksheet.xmlMapQuery() method specifies the xml element path and the second parameter specifies the xml map you want to query.

The following sample code queries the xml map two times and prints the list of cell areas returned by the Worksheet.xmlMapQuery() method on console.

//Load sample Excel file having Xml Map
Workbook wb = new Workbook(dirPath + "sampleXmlMapQuery.xlsx");

//Access first XML Map
XmlMap xmap = wb.getWorksheets().getXmlMaps().get(0);

//Access first worksheet
Worksheet ws = wb.getWorksheets().get(0);

//Query Xml Map from Path - /MiscData
System.out.println("Query Xml Map from Path - /MiscData");
ArrayList ret = ws.xmlMapQuery("/MiscData", xmap);

//Print returned ArrayList values
for (int i = 0; i < ret.size(); i++)
{
    System.out.println(ret.get(i));
}

System.out.println("");

//Query Xml Map from Path - /MiscData/row/Color
System.out.println("Query Xml Map from Path - /MiscData/row/Color");
ret = ws.xmlMapQuery("/MiscData/row/Color", xmap);

//Print returned ArrayList values
for (int i = 0; i < ret.size(); i++)
{
    System.out.println(ret.get(i));
}

Determine Smart Art Shape and Convert it to Group Shape

Smart Art shapes are special shapes that allow you create complex diagrams automatically. Aspose.Cells allows you to detect Smart Art shapes and convert them to Group shape that enables you to handle smart art shape like a group shape. Consequently, you will have access to the individual parts or shapes of the group shape.

Create and Protect a Shared Workbook

Microsoft Excel allows you to create a shared workbook. When you share the workbook, then more than one user can edit the workbook. Aspose.Cells enables you to create a shared workbook with Workbook.Settings.Shared property. Besides, you can protect or unprotect a shared workbook.

Render Sequence of Pages using PageIndex and PageCount Properties of ImageOrPrintOptions

Aspose.Cells allows you to render sequence of pages of your Excel file to images using ImageOrPrintOptions.PageIndex and ImageOrPrintOptions.PageCount properties. These properties are useful when there are so many pages in your worksheet but you need to render a few pages only. This will not only save the processing time but also saves the memory consumption of the rendering process.

Ignore Errors while Rendering Excel to PDF

You can ignore all errors during the conversion process using the PdfSaveOptions.IgnoreError property. This way, conversion process will be completed smoothly without throwing any error or exception but data loss may occur.

Aspose.Cells for Java Resources

The resources, you may need to accomplish your tasks:


To keep up with our news, you can follow us on Twitter or follow our Facebook page.

Leave a Reply