Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Powershell - CSV to Excel

$
0
0

(i checked the suggested threads before posting)

 I want a powershell script to convert CSV files to Excel..

 Now i found posts , e.g.

http://stackoverflow.com/questions/17688468/how-to-export-a-csv-to-excel-using-powershellV

http://blogs.technet.com/b/heyscriptingguy/archive/2010/09/09/copy-csv-columns-to-an-excel-spreadsheet-by-using-powershell.aspx

 Any i can mke this work, however the execution time is enormous when you update per cell, e.g.

 #$worksheet1.Cells.Item($r,$c) = "$(($a).replace('"',''))"

 #$c++

 

I tied some code like :

 $rows =  import-csv $inputfile

 ..

$rows | Clip

 $worksheet1.Activate

#Select all used cells

 $worksheet1.Paste()

 But this is in the wrong format to work

>> So how can i update per row or per whole sheet ?  

Thanks   



Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>