Preservation of SmartArts in Excel files
GemBox.Spreadsheet supports many Microsoft Excel and LibreOffice (or Open Office) features, but not all. You can preserve unsupported features when reading a workbook so that they are not lost when writing to a workbook of the same format.
You can read more about GemBox.Spreadsheet's preservation feature on the Preservation help page.
The following example shows how to preserve SmartArts in an Excel file from input to output, using C# and VB.NET.

using GemBox.Spreadsheet;
class Program
{
static void Main()
{
// If using the Professional version, put your serial key below.
SpreadsheetInfo.SetLicense("FREE-LIMITED-KEY");
// Load Excel file with preservation feature enabled.
var loadOptions = new XlsxLoadOptions() { PreserveUnsupportedFeatures = true };
var workbook = ExcelFile.Load("%InputFileName%", loadOptions);
// Save Excel file to output file of same format together with
// preserved information (unsupported features) from input file.
workbook.Save("Preserved Output.xlsx");
}
}
Imports GemBox.Spreadsheet
Module Program
Sub Main()
' If using the Professional version, put your serial key below.
SpreadsheetInfo.SetLicense("FREE-LIMITED-KEY")
' Load Excel file with preservation feature enabled.
Dim loadOptions As New XlsxLoadOptions() With {.PreserveUnsupportedFeatures = True}
Dim workbook = ExcelFile.Load("%InputFileName%", loadOptions)
' Save Excel file to output file of same format together with
' preserved information (unsupported features) from input file.
workbook.Save("Preserved Output.xlsx")
End Sub
End Module
See also
Next steps
Published: February 10, 2020 | Modified: December 19, 2022 | Author: Mario Zorica