guimatheus92 / Convert-Excel-file-to-CSV-from-a-PowerShell-script

How to convert an Excel file using a PowerShell script.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to convert an Excel file using a PowerShell script

A document repository can also be found in my profile article at Medium.


For the script EXCEL_TO_CSV_ALLTABS.ps1, where we convert all tabs of an Excel file, just enter the name of the directory, the name of the file and the file format. The script use the function to convert Excel files with XLSX to CSV format, however this format can be changed in the script.

If you want, you can change the folder and your filename

# Defines the directory where the file is located
$dir = "D:\"

# Defines the name of the Excel file
$excelFileName = "YOUR_FILE_NAME"

For the second script EXCEL_TO_CSV.ps1, where we convert just one tab of an Excel file, just enter the name of the directory and the name of the file in the script below.

About

How to convert an Excel file using a PowerShell script.


Languages

Language:PowerShell 100.0%