Visitar URL original
Defined names - API · Issue #726 · ExcelDataReader/ExcelDataReader · GitHub
Skip to content

Defined names - API #726

Open
Open

Description

@hughbe

As I look at implementing GetCellFormula(int index) for XLS, there are some dependencies, for example defined names. These are defined on the worksheet and workbook level. See, for example https://docs.devexpress.com/OfficeFileAPI/DevExpress.Spreadsheet.DefinedName.

To help shape how I implement this, would it be useful to expose a class like

public class DefinedName
{
    public string Name { get; }
    public string Formula { get; }
    public bool IsGlobal { get; }
}

and an API like

public interface IExcelDataReader
{
    public IReadOnlyList<DefinedName> GetDefinedNames();
    public IReadOnlyList<DefinedName> GetDefinedNames(int sheetIndex);
}

What do you think?

Activity

  1. appel1 commented on Nov 11, 2025

    @appel1
    Collaborator

    Thank you for digging into this!

    In general we've tried to only keep track of per-sheet data while the sheet is being read. Is there a compelling reason for GetDefinedName(int)? Or is this due to how the data is stored so we can load it on demand in an efficient manner?

    Since both return values are lists maybe call both GetDefinedNames?

    What's the IsGlobal property for when there are two separate methods for workbook/worksheet names?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions