Showing posts with label xlss to csv using powershell. Show all posts
Showing posts with label xlss to csv using powershell. Show all posts

Thursday, 29 January 2015

Powershell Script to Convert xlsx to csv


Use the below code to convert the xlsx file into csv:


$xlsx_file="C:\Users\v-gibag\Desktop\locations.xlsx"
$csv_file="C:\Users\v-gibag\Desktop\user1.csv"
$Excel = new-object -comobject excel.application
$book = $Excel.Workbooks.Open($xlsx_file)
$book.SaveAs($csv_file,6)
$book.Close($false)
$Excel.quit()