alexa
menu

Document Processing

    Show / Hide Table of Contents

    ExcelWorkbookManager Class

    Manager for handling Excel workbooks in memory during AI agent operations. Provides workbook lifecycle management with automatic cleanup.

    Inheritance
    System.Object
    DocumentManagerBase<IWorkbook>
    ExcelWorkbookManager
    Implements
    IDocumentManager
    System.IDisposable
    Inherited Members
    DocumentManagerBase<IWorkbook>.ImportDocument(IWorkbook)
    Namespace: Syncfusion.AI.AgentTools.Excel
    Assembly: Syncfusion.DocumentSDK.AI.AgentTools.dll
    Syntax
    public class ExcelWorkbookManager : DocumentManagerBase<IWorkbook>, IDocumentManager, IDisposable

    Constructors

    ExcelWorkbookManager(Nullable<TimeSpan>)

    Initializes a new instance of the ExcelWorkbookManager class.

    Declaration
    public ExcelWorkbookManager(Nullable<TimeSpan> expirationTime = null)
    Parameters
    Type Name Description
    System.Nullable<System.TimeSpan> expirationTime

    Time before workbooks are automatically cleaned up. Default is 30 minutes.

    Properties

    ActiveWorkbookId

    Gets or sets the currently active workbook ID.

    Declaration
    public string ActiveWorkbookId { get; set; }
    Property Value
    Type
    System.String

    DocumentIdPrefix

    Gets the prefix used for generating unique workbook identifiers.

    Declaration
    protected override string DocumentIdPrefix { get; }
    Property Value
    Type Description
    System.String

    The prefix string "xl_" used for Excel workbook IDs.

    Overrides
    Syncfusion.AI.AgentTools.Core.DocumentManagerBase<Syncfusion.XlsIO.IWorkbook>.DocumentIdPrefix

    DocumentType

    Gets the document type managed by this manager.

    Declaration
    public override DocumentType DocumentType { get; }
    Property Value
    Type Description
    DocumentType

    DocumentType.Excel indicating this manager handles Excel workbooks.

    Overrides
    Syncfusion.AI.AgentTools.Core.DocumentManagerBase<Syncfusion.XlsIO.IWorkbook>.DocumentType

    Methods

    CloseDocument(IWorkbook)

    Closes and releases the resources associated with the Excel workbook.

    Declaration
    protected override void CloseDocument(IWorkbook document)
    Parameters
    Type Name Description
    IWorkbook document

    The IWorkbook instance to close.

    Overrides
    Syncfusion.AI.AgentTools.Core.DocumentManagerBase<Syncfusion.XlsIO.IWorkbook>.CloseDocument(Syncfusion.XlsIO.IWorkbook)

    CreateDocumentInstance()

    Creates a new empty Excel workbook instance.

    Declaration
    protected override IWorkbook CreateDocumentInstance()
    Returns
    Type Description
    IWorkbook

    A new IWorkbook instance ready for editing.

    Overrides
    Syncfusion.AI.AgentTools.Core.DocumentManagerBase<Syncfusion.XlsIO.IWorkbook>.CreateDocumentInstance()

    Dispose()

    Disposes the Excel engine and all managed workbooks.

    Declaration
    public void Dispose()

    ExportDocumentInstance(IWorkbook, String)

    Exports the Excel workbook to the specified file path.

    Declaration
    protected override void ExportDocumentInstance(IWorkbook document, string filePath)
    Parameters
    Type Name Description
    IWorkbook document

    The IWorkbook instance to export.

    System.String filePath

    The file path where the workbook will be saved. CSV format is supported with .csv extension.

    Overrides
    Syncfusion.AI.AgentTools.Core.DocumentManagerBase<Syncfusion.XlsIO.IWorkbook>.ExportDocumentInstance(Syncfusion.XlsIO.IWorkbook, System.String)

    ImportDocumentInstance(String)

    Imports an existing Excel workbook from the specified file path.

    Declaration
    protected override IWorkbook ImportDocumentInstance(string filePath)
    Parameters
    Type Name Description
    System.String filePath

    The file path to the Excel workbook to load.

    Returns
    Type Description
    IWorkbook

    An IWorkbook instance loaded from the specified file.

    Overrides
    Syncfusion.AI.AgentTools.Core.DocumentManagerBase<Syncfusion.XlsIO.IWorkbook>.ImportDocumentInstance(System.String)

    ImportDocumentInstance(String, String)

    Imports an encrypted Excel workbook from the specified file path using the provided password.

    Declaration
    protected override IWorkbook ImportDocumentInstance(string filePath, string password)
    Parameters
    Type Name Description
    System.String filePath

    The file path to the encrypted Excel workbook.

    System.String password

    The password required to open the encrypted workbook.

    Returns
    Type Description
    IWorkbook

    An IWorkbook instance loaded from the specified file with decryption applied.

    Overrides
    Syncfusion.AI.AgentTools.Core.DocumentManagerBase<Syncfusion.XlsIO.IWorkbook>.ImportDocumentInstance(System.String, System.String)

    Implements

    IDocumentManager
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved