Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have utility methods to iterate over Excel tables #1821

Open
Sebazzz opened this issue Jan 23, 2025 · 3 comments
Open

Have utility methods to iterate over Excel tables #1821

Sebazzz opened this issue Jan 23, 2025 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Sebazzz
Copy link

Sebazzz commented Jan 23, 2025

Is your feature request related to a problem? Please describe.
While EPPlus is great for creating Excel files, it is not as convenient to use for consuming Excel packages.

What I like from ClosedXML is that they offer useful abstractions for iterating over Excel tables, distinguishing columns, rows, and cells.

Unless I'm missing something, EPPlus does not have anything like this.

Describe the solution you'd like

Example from ClosedXML:

foreach (IXLTableRow primaryRow in primaryTable.DataRange.Rows()) {
    string num = primaryRow.Field("Num").GetValue<string>();

    // Use of filtering / LINQ
    foreach (IXLTableRow joinedRow in secondaryTable.DataRange.Rows(row => row.Field("PrimaryNum").GetValue<string>() == num)) {
            string field = joinedRow .Field("MyField").GetValue<string>();

           // ...
    }
}
@AdrianEPPlus AdrianEPPlus added the enhancement New feature or request label Jan 23, 2025
@AdrianEPPlus
Copy link
Contributor

We are not entirely sure what you are asking for. Could you describe you issue in more detail?

@Sebazzz
Copy link
Author

Sebazzz commented Jan 28, 2025

Being able to iterate over Excel table rows and address cells by column name.

@swmal
Copy link
Contributor

swmal commented Jan 29, 2025

@Sebazzz This makes sense. We'll consider adding something similar to your suggestion.

@swmal swmal self-assigned this Jan 29, 2025
@swmal swmal added this to the EPPlus 8.0 milestone Jan 29, 2025
swmal pushed a commit that referenced this issue Feb 7, 2025
JanKallman pushed a commit that referenced this issue Feb 7, 2025
* #1821 - started work on a new DataRows api on ExcelTables

* Added GetFormula, Insert, Delete methods

* Fixed an xml comment

* #1821 - fixed some xml comments

---------

Co-authored-by: swmal <{ID}+username}@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants