SQL Server Video to Extract All Excel Worksheets into individual CSV files


By:   |   Updated: 2014-08-06   |   Comments (1)   |   Related: More > PowerShell










Enter your business email address to
get free SQL Server tips.

Problem / Solution

We get Excel files with several worksheets and we want a way to automate the extraction of each worksheet, so it can be imported into SQL Server.  In this video tip, we look at how to use PowerShell to automate the extraction of each individual worksheet into separate CSV files for easy import into the database.

Key Learning Items
  • Opening Excel files using PowerShell
  • Looping through each worksheet and extracting the data into individual CSV files
Read Companion Tip

Click Here



Last Updated: 2014-08-06


get scripts

next tip button



About the author
MSSQLTips author Tim Smith Tim Smith works as a DBA and developer and also teaches Automating ETL on Udemy.

View all my tips
Related Resources





Comments For This Article




Tuesday, August 12, 2014 - 10:14:26 AM - Dan holmes Back To Top (34093)

Looks like the same technique as described here:

http://dnhlmssql.blogspot.com/2013/05/from-excel-to-insert-into-another.html

 



download





Recommended Reading

Setting the PowerShell Execution Policy

How to find a specific text string in a SQL Server Stored Procedure, Function, View or Trigger

Using PowerShell to Work with Directories and Files

Bulk Copy Data from Oracle to SQL Server

Execute SQL Server Stored Procedures from PowerShell








get free sql tips
agree to terms


Learn more about SQL Server tools