Spire.XLS for Python 15.5.0 supports grouping Shapes

Spire.XLS for Python 15.5.0 supports grouping Shapes

2025-05-15 09:41:58

We're pleased to announce the release of Spire.XLS for Python 15.5.0. This version supports grouping Shapes. Besides, some known bugs are fixed successfully, such as the issue where saving a chart to an image caused the program to report a "SpireException: Arg_InvalidCastException" error. More details are listed below.

Here is a list of changes made in this release

Category ID Description
New feature SPIREXLS-4191 Supports grouping Shapes.
workbook = Workbook()
workbook.LoadFromFile(inputFile)
worksheet = workbook.Worksheets[0]
shape1 = worksheet.PrstGeomShapes[0]
shape2 = worksheet.PrstGeomShapes[1]
groupShapeCollection = worksheet.GetGroupShapeCollection()
groupShapeCollection.Group([shape1, shape2])
workbook.SaveToFile(outputFile, ExcelVersion.Version2013)
workbook.Dispose()
New feature SPIREXLS-4460 Supports replacing the font.
wb = Workbook()
wb.LoadFromFile(inputFile)

sheet = wb.Worksheets[0]

# Create a cell style and set the color
style = wb.Styles.Add("Mystyle")
style.Font.FontName = "Arial"

style2 = wb.Styles.Add("Mystyle1")
style2.Font.FontName = "Times New Roman"

style3 = wb.Styles.Add("Mystyle2")
style3.Font.FontName = "Calibri"

wb.Worksheets[0].ReplaceAll("Brillux", style,"e-iceblue", style2)
wb.Worksheets[0].ReplaceAll("3342sdf",style,  "text", style3)
wb.SaveToFile(outputFile)
wb.Dispose()
New feature SPIREXLS-4857 Supported customizing PivotTable field names.
workbook = Workbook()
workbook.LoadFromFile(inputFile)
sheet = workbook.Worksheets.get_Item("Tabular Pivot")
table = sheet.PivotTables.get_Item(0)
table.PivotFields[1].CustomName = "fieldName1"
table.PivotFields[2].CustomName = "fieldName2"
table.RowFields[0].CustomName = "rowName"
table.ColumnFields[0].CustomName = "colName"
table.PivotFields[0].CustomName = "fieldName0"
table.DataFields[0].CustomName = "DataName"
table.CalculateData()
workbook.SaveToFile(outputFile, ExcelVersion.Version2013)
workbook.Dispose()
New feature SPIREXLS-5254 Supports enabling revision mode.
workbook = Workbook()
workbook.LoadFromFile(inputFile)
workbook.TrackedChanges(True);
workbook.SaveToFile(outputFile, ExcelVersion.Version2013);
workbook.Dispose()
New feature SPIREXLS-5482 Supports embedding images into cells.
workbook = Workbook()
workbook.LoadFromFile(inputFile)
sheet = workbook.Worksheets[0]
sheet.Range["D1"].InsertOrUpdateCellImage(inputFile_Img,True)
workbook.SaveToFile(outputFile,ExcelVersion.Version2013)
workbook.Dispose()
Adjustment / Upgrades SkiaSharp->3.116.1.
Adjustment / Adding support for the Linux ARM platform.
Bug SPIREXLS-5643 SPIREXLS-5677 Fixes the issue where saving a chart to an image caused the program to report a "SpireException: Arg_InvalidCastException" error.
Bug SPIREXLS-5755 Fixes the issue where loading a specific XLSM document caused the program to report a "SpireException: Arg_NullReferenceException" error.
Bug SPIREXLS-5783 Fixes the issue where loading a specific XLSX document caused the program to report an "Arg_IndexOutOfRangeException" error.
Click the link to download Spire.XLS for Python 15.5.0: