How to Export a SharePoint Document Library to Excel

How to Export a SharePoint Document Library to Excel (2025)

Last Updated on September 14, 2024

Can you export a library to Excel?

In this guide, I will show you how you can easily export a document library from SharePoint Online to Excel.

Let’s get started.

What does exporting a library mean?

Basically, it allows you to take the data stored in the library and view it in an Excel workbook.

Here’s what’s included in the export data:

  • File paths and folder structure
  • Document metadata
  • Library contents

It’s important to note that exporting a library doesn’t include document contents or file versions.

In a way, the export gives a snapshot of the data in the library, which can be updated manually in Excel if needed.

👉 Related: How to Create a Document Library in SharePoint Online

Sign up for exclusive updates, tips, and strategies

    Method 1: Export to Excel

    This is the most straightforward method for getting a quick snapshot of your files and metadata.

    You can do this directly from the SharePoint interface:

    • Go to the SharePoint document library you want to export
    • Find the export to Excel button

    It’s in the command bar, usually hidden in the more options (ellipsis) section:

    export to excel button in sharepoint

    A query file (.iqy file) will then be downloaded to your computer.

    If you open the exported file, you can see the data structured in rows and columns, with the file names, paths, and metadata.

    But you won’t find actual contents in the Excel file:

    query file content in excel

    It’s important to note that data here isn’t synced with SharePoint.

    If any changes occur in the library, you will need to manually refresh the data in Excel and export the library again. 😅

    Method 2: Excel’s Data Tab for Metadata Export

    Another way to export metadata is from Excel itself, without relying on the export to Excel button.

    Open Microsoft Excel first:

    • Go to the data tab in the ribbon
    • Select get data > from online services 
    • Then from SharePoint Online list

    Like this:

    from sharepoint list option for getting data to excel

    From there, simply connect to your document library and follow the prompts to select and import the desired data.

    Once again, this would pull metadata like file properties or custom fields, without including folder structures.

    By the way, if you’re confused why it’s only “lists” in the options, that’s because libraries are technically lists. 🙂

    👉 Related: SharePoint List vs Library: The Differences (Comparison)

    Practical Use Cases

    As you know, exporting a document library to Excel can be applied in various real-world situations.

    Some examples include:

    • Auditing library contents
    • Restructuring document libraries on a SharePoint site
    • Analyzing metadata
    • Tracking document usage

    These exports are especially helpful for large libraries where visual review is inefficient.

    That’s because Excel has powerful tools like Power Query that can make it easier to work with SharePoint data.

    Anyway, got any questions about exporting a document library to Excel? Let me know below.

    For any business-related queries or concerns, contact me through the contact form. I always reply. 🙂

    About Ryan Clark

    As the Modern Workplace Architect at Mr. SharePoint, I help companies of all sizes better leverage Modern Workplace and Digital Process Automation investments. I am also a Microsoft Most Valuable Professional (MVP) for SharePoint and Microsoft 365.

    Subscribe
    Notify of
    guest
    0 Comments
    Oldest
    Newest Most Voted
    Inline Feedbacks
    View all comments
    0
    Would love your thoughts, please comment.x
    ()
    x
    Scroll to Top