Version 2022.8.8357 Features & Upgrades
- Adds a feature of encrypting and decrypting ".xlsx", ".xlsm" and ".xltx" files with a password. Use WorkBook.SaveAs(string fileName, string password) method to encrypt the WorkBook with provided password when saving it. Use WorkBook.Load(string filename, string password) method to decrypt file with provided password when loading the workbook. Password can also be specified with following:
- using WorkBook.Password property (workbook will be encrypted on save if this property is not null, and will not be encrypted if it is null)
- using SavingOptions object with SavingOptions.Password property, when calling WorkBook.SaveAs(string fileName, SavingOptions options) method
- using LoadingOptions object with LoadingOptions.Password property, when calling WorkBook.Load(string filename, LoadingOptions options) method
To check if the WorkBook object will be encrypted on save use WorkBook.IsEncrypted boolean property. Encryption can also be turned off by assigning WorkBook.IsEncrypted = false (Note: workbook cannot be encrypted by assigning WorkBook.IsEncrypted = true, this will throw an exception at runtime, asking to instead specify a password).
Setting passwords to a workbook of a type other than ".xlsx", ".xlsm" and ".xltx" will also throw an exception at runtime alerting user that the workbook could not be encrypted
- Adds support for .NET 6.0
- Removes dependency on System.Common.Drawing
- Removes support for .NET Framework 4.5. Minimum supported .NET Framework version is now 4.6.2
- Breaking change: WorkBook.SaveAs(string filename, string listDelimiter) method was renamed to WorkBook.SaveAsWithCustomDelimiter(string filename, string listDelimiter) to remove ambiguity between SaveAs(string filename, string listDelimiter) and SaveAs(string fileName, string password) methods
- Breaking change: IronXL.Drawing.Images.IImage.ToBitmap() method is removed, as System.Common.Drawing is no longer supported.
- Breaking change: IronXL.Drawing.Images.IImage.ToImage() method now returns a SixLabors.ImageSharp.Image object used as a replacement for removed System.Common.Drawing objects.
- Fixes a bug where a background color set to a cell or a range in XLSX workbook didn't render in Excel.
- Fixes a bug where Thai language locale throwed license exception
- Fixes a bug where each time a new cell was assigned a DateTime value in XLSX workbook a new cell style was created for each cell, overflowing the style table and breaking the resulting file if the number of cells was > 64000.
- Improves speed of creating large amounts of cells with a DateTime value and format. For example, creating a workbook with 80K DateTime value and format cells on a single worksheet used to take 25 seconds, and now takes less then 0.8 seconds (actual performance will depend on the environment the code is executed in).