Spire.XLS 15.9.7 supports creating and modifying Equations

Spire.XLS 15.9.7 supports creating and modifying Equations

2025-09-24 06:10:59

We're pleased to announce the release of Spire.XLS 15.9.7. This version adds a new interface for creating and modifying Equations, and also supports the ISOMITTED, LAMBDA functions. Besides, some issues that occurred when converting Excel to PDF and copying worksheets have been successfully fixed. More details are shown below.

Here is a list of changes made in this release

Category ID Description
Optimization SPIREXLS-5888 Optimizes the time consumption for converting Excel to PDF.
Optimization SPIREXLS-5929 Optimizes the time consumption for converting Excel to HTML.
New feature SPIREXLS-4316 Adds IXlsEquation Interface to support creating and modifying Equations.
Workbook workbook = new Workbook();
workbook.LoadFromFile("Equation_1.xlsx");
Worksheet sheet = workbook.Worksheets[0];
// Add a new equation at position (1, 1) with size 50x50, displaying fraction A/B
sheet.Equations.AddEquation(1, 1, 50, 50, "\\frac{A}{B}");
// Get the first equation in the worksheet
IXlsEquation equation = sheet.Equations[0];
// Update the equation content using LaTeX syntax
equation.UpdateByLatexText("\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha}");
// Set the position and size of the equation
equation.Top = 19;
equation.Left = 72;
equation.Width = 100;
equation.Height = 100;
// Get the second equation in the worksheet
IXlsEquation equation1 = sheet.Equations[1];
// Get the collection of equation items (components of the formula)
IEquationItemCollection equationItems = equation1.EquationItems;
// Get the first item in the collection
IEquationItem item1 = equationItems[0];
item1.Text = "e-iceblue"; // Modify the text of the item
// Append a new LaTeX formula at the end
equationItems.AddByLatex("\\frac{n!}{r!(n-r)!} ");
// Insert a LaTeX formula at index 0
equationItems.InsertByLatex(0, "\\Delta A B C");
// Save the workbook
workbook.SaveToFile("out.xlsx");
New feature SPIREXLS-5934 Supports preserving frozen rows when converting Excel to HTML.
HTMLOptions.Default.IsSaveFreezedPanes = true;  // true to preserve freeze panes, false to discard
New feature SPIREXLS-5935 Supports the ISOMITTED function.
sheet.Range["D7"].Formula = "=LAMBDA(val,max,IF(ISOMITTED(max),val,IF(AND(val>0,val<max),\"within range\",\"out of range\")))(A1,A2)";
                        
New feature SPIREXLS-5941 Supports the LAMBDA function.
sheet.Range["D5"].Formula = "=LAMBDA(a,b,IF(ISOMITTED(b),a*a,a*b))(A1,A2)";
Bug SPIREXLS-5856 Fixes the issue where row height was retrieved incorrectly.
Bug SPIREXLS-5904 Fixes the issue where text boxes were missing when converting Excel to PDF.
Bug SPIREXLS-5907 Fixes the issue where text alignment in text boxes was incorrect when converting Excel to PDF.
Bug SPIREXLS-5910 Fixes the issue where data was incorrect when converting Excel to PDF.
Bug SPIREXLS-5915 Fixes the issue where content was incorrect when converting Excel to PDF.
Bug SPIREXLS-5926 Fixes the issue where rendering was incorrect when converting Excel to PDF.
Bug SPIREXLS-5932 Fixes the issue where borders were incorrect when converting Excel to PDF.
Bug SPIREXLS-5940 Fixes the issue that copying a worksheet containing a Slicer to another workbook threw a "System.ArgumentOutOfRangeException" exception.
Bug SPIREXLS-5947 Enhances compatibility handling for NamedRanges that contain error values.
Bug SPIREXLS-5953 Fixes the issue where chart formatting was incorrect when converting Excel to images.
Click the link to download Spire.XLS 15.9.7:
More information of Spire.XLS new release or hotfix: