Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. $Excel = New-Object -Com Excel.Application
  2.  
  3. foreach ($File in (gci *xls)) {
  4. $Workbook = $Excel.Workbooks.Open($File.FullName)
  5. $Workbook.SaveAs(($File.FullName + "x"), 51)
  6. $Workbook.Close($false)}
  7.  
  8. $Excel.Quit()
  9.  
  10. $Excel = New-Object -Com Excel.Application
  11.  
  12. foreach ($File in (gci *xls)) {
  13. $Workbook = $Excel.Workbooks.Open($File.FullName)
  14. $Workbook.SaveAs($File.FullName.Replace(".xls",".csv"), 6)
  15. $Workbook.Close($false)}
  16.  
  17. $Excel.Quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement