XlsmFormatProvider
Imports and exports workbooks in Excel Macro-Enabled Workbook (.xlsm) format, preserving VBA macros and scripts.
Definition
Namespace:Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsm
Assembly:Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.dll
Syntax:
public class XlsmFormatProvider : BinaryWorkbookFormatProviderBase, IBinaryWorkbookFormatProvider, IWorkbookFormatProvider
Inheritance: objectWorkbookFormatProviderBaseBinaryWorkbookFormatProviderBaseXlsmFormatProvider
Implements:
Inherited Members
Constructors
Initializes a new instance of the XlsmFormatProvider class.
public XlsmFormatProvider()
Methods
Writes the workbook to the stream in .xlsm format with cancellation support, preserving any VBA macros or scripts present.
protected override void ExportOverride(Workbook workbook, Stream output, CancellationToken cancellationToken)
The workbook.
outputStreamThe output.
cancellationTokenCancellationTokenThe cancellation token used to cancel the operation.
Overrides:
Reads an .xlsm file from the stream with cancellation support, constructing a Workbook instance while preserving VBA macros.
protected override Workbook ImportOverride(Stream input, CancellationToken cancellationToken)
The input.
cancellationTokenCancellationTokenThe cancellation token used to cancel the operation.
Returns:The imported workbook.
Overrides:
Properties
Indicates whether this provider supports exporting workbooks to .xlsm format.
public override bool CanExport { get; }
The value indicating whether can export.
Overrides:
Indicates whether this provider supports importing .xlsm files into workbook instances.
public override bool CanImport { get; }
The value indicating whether can import.
Overrides:
Human-readable description of supported files (e.g., "Excel Macro-Enabled Workbook").
public override string FilesDescription { get; }
The files description.
Overrides:
Identifier for this format provider, used for discovery and registration.
public override string Name { get; }
The name of the provider.
Overrides:
File extensions recognized by this provider (e.g., ".xlsm").
public override IEnumerable<string> SupportedExtensions { get; }
The supported extensions.
Overrides: