#excel to #csv in #powershell (New-Object -ComObject Excel.Application).Workbooks.Open("c:x.xlsx").SaveAs("c:x.csv",6) — laurentsch (@laurentsch) February 13, 2015 One-liner to convert Excel to CSV (or to and from any other format). There is a bug 320369 if you have excel in English and your locale is not America. Just change your settings to us_en before conversion.
Powershell is very strong with XML, to convert an XML document to something flat like a CSV file, it is incredibly powerfull. Let’s take a file called emp.xml 10 CLARK MILLER KING 20 SMITH FORD ADAMS SCOTT JONES 30 ALLEN WARD MARTIN BLAKE TURNER JAMES To get all employees, it is awfully easy ([xml](gc emp.xml)).EMPTABLE.DEPT.EMPLIST.ENAME […]
I got some comments that my other csv solutions were slow to export gigabytes of data. One more try. thanks to the feedbacks, I provided a new version This could generate very large files in just a few minutes (instead of hours). I use bulk collect and utl_file to boost performance CREATE TYPE collist IS […]