ClassXlsmFormatProvider
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
XlsmFormatProvider()
Initializes a new instance of the XlsmFormatProvider class.
Declaration
public XlsmFormatProvider()
Properties
CanExport
Indicates whether this provider supports exporting workbooks to .xlsm format.
Declaration
public override bool CanExport { get; }
Property Value
The value indicating whether can export.
Overrides
CanImport
Indicates whether this provider supports importing .xlsm files into workbook instances.
Declaration
public override bool CanImport { get; }
Property Value
The value indicating whether can import.
Overrides
FilesDescription
Human-readable description of supported files (e.g., "Excel Macro-Enabled Workbook").
Declaration
public override string FilesDescription { get; }
Property Value
The files description.
Overrides
Name
Identifier for this format provider, used for discovery and registration.
Declaration
public override string Name { get; }
Property Value
The name of the provider.
Overrides
SupportedExtensions
File extensions recognized by this provider (e.g., ".xlsm").
Declaration
public override IEnumerable<string> SupportedExtensions { get; }
Property Value
IEnumerable<string>
The supported extensions.
Overrides
Methods
ExportOverride(Workbook, Stream)
Writes the workbook to the stream in .xlsm format, preserving any VBA macros or scripts present.
Declaration
[Obsolete("This method is obsolete. Please use ExportOverride(Workbook workbook, Stream output, CancellationToken cancellationToken) instead.")]
protected override void ExportOverride(Workbook workbook, Stream output)
Parameters
workbook
The workbook.
output
The output.
Overrides
ExportOverride(Workbook, Stream, CancellationToken)
Writes the workbook to the stream in .xlsm format with cancellation support, preserving any VBA macros or scripts present.
Declaration
protected override void ExportOverride(Workbook workbook, Stream output, CancellationToken cancellationToken)
Parameters
workbook
The workbook.
output
The output.
cancellationToken
The cancellation token used to cancel the operation.
Overrides
ImportOverride(Stream)
Reads an .xlsm file from the stream and constructs a Workbook instance, preserving VBA macros if present.
ImportOverride(Stream, CancellationToken)
Reads an .xlsm file from the stream with cancellation support, constructing a Workbook instance while preserving VBA macros.
Declaration
protected override Workbook ImportOverride(Stream input, CancellationToken cancellationToken)
Parameters
input
The input.
cancellationToken
The cancellation token used to cancel the operation.
Returns
The imported workbook.
Overrides