Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9181325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:17:10+00:00 2026-06-17T18:17:10+00:00

I have 3 tables in a sheet of excel file, and I use OpenXML

  • 0

I have 3 tables in a sheet of excel file,
and I use OpenXML SDK to read the Excel file, like this:

SpreadSheetDocument document = SpreadSheetDDocument.open(/*read it*/);
foreach(Sheet sheet in document.WorkbookPart.Workbook.Sheets)
{
   //I need each table or work part of sheet here
}

So as you see I can get each sheet of Excel, but how can I get workparts in each sheet, like my 3 tables I should can iterate on these tables, does any one know about this? any suggestion?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:17:11+00:00Added an answer on June 17, 2026 at 6:17 pm

    Does this help?

    // true for editable
    using (SpreadsheetDocument xl = SpreadsheetDocument.Open("yourfile.xlsx", true))
    {
        foreach (WorksheetPart wsp in xl.WorkbookPart.WorksheetParts)
        {
            foreach (TableDefinitionPart tdp in wsp.TableDefinitionParts)
            {
                // for example
                // tdp.Table.AutoFilter = new AutoFilter() { Reference = "B2:D3" };
            }
        }
    }
    

    Note that the actual cell data is not in the Table object, but in SheetData (under Worksheet of the WorksheetPart). Just so you know.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an excel file that i need to open and search it. This
I have tables like this: tblUsers int UserID string UserName tblUsersInRoles int UserID int
I have wrote a code that can read an excel 2007 file using Microsoft
I have an excel sheet similar to : I want to read data columns
Hi everyone i have an excel file which i want to use as source
I have a dynamic range in an Excel sheet. DATA_TABLE =OFFSET(DATA!$B$3,0,0,COUNTA(DATA!$B:$B)-1,0) I want to
I have tables like these two test_table date student test 2012-05-31 Alice Math 2012-05-31
I have SSIS Package which Exports Data from table to Excel file Control Flow
I have an excel file with 815 records that includes service name and charge.
I like to make excel file when I press the the button with below

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.