SSIS tips: How to import data from MongoDB to Excel

Introduction

Looking to extract data from MongoDB and load it into Excel for reporting, analysis, or automation? With SSIS, you can connect to MongoDB, retrieve collections, and export the data into Excel, no scripting required.

In this guide, you’ll learn how to move data quickly and efficiently using MongoDB Source and Excel Destination, components from ZappySys SSIS PowerPack.

Prerequisites

Steps

Step 1: Configure the MongoDB Source

  1. In the Control Flow, drag a Data Flow Task onto the canvas and double-click to open the Data Flow.

  2. Drag the MongoDB Source from the SSIS Toolbox.

  3. Double-click the source component and create a new Connection.

  4. Enter the Host, Port, Database Name, and Authentication Info (if required).

  5. Test the connection and click OK to save the connection.

  6. Choose the Collection Name from the dropdown.

  7. Optionally, enter a Query for more filter options.

  8. Click Preview to validate the data, then click OK to save.

Step 2: Set up the Excel Destination

  1. From the toolbox, drag the Excel Destination into the Data Flow and connect it to the MongoDB Source.

  2. In the Connection Managers area, right-click and choose New Connection, then select ZS-EXCEL.

  3. Enter the file path into the Excel connection.

  4. Optionally, enter the Excel format and Excel protection settings (read/edit passwords).

  5. Test the connection and click Ok to save the connection.

  6. Double-click the Excel Destination component and select the Excel connection.

  7. Choose the worksheet in Component Properties and define options like starting cell or overwrite behavior.

  8. Map the input columns by going to the Input Columns tab and selecting the fields to export.

  9. Click OK to finalize the configuration.

Step 3: Run and verify

  1. Run the SSIS package.

  2. Open the resulting Excel file and review the imported data to ensure everything loaded correctly.

Video tutorial

Conclusion

Importing data from MongoDB into Excel is simple and powerful using SSIS and ZappySys. Whether handling structured documents or nested arrays, the MongoDB Source and Excel Destination components allow you to integrate and export data without writing any code.

For more advanced file, API, and cloud integrations, explore the full capabilities of the ZappySys SSIS PowerPack.

References

Contact us

If you encounter any challenges or have specific use cases, please contact our support team via chat or ticket.