csv-export.xls.vb 481 B

1234567891011121314151617
  1. Sub Workflow(folder As String)
  2. Dim file As String
  3. file = dir(folder & "\*.xls")
  4. Do While file <> ""
  5. If file Like "*xls" Then
  6. Workbooks.Open Filename:=folder + "\" + file
  7. file = Left(file, Len(file) - 4)
  8. ActiveWorkbook.SaveAs Filename:=folder + "\" + file + ".csv", FileFormat:=xlCSV, CreateBackup:=False, Local:=True
  9. ActiveWorkbook.Close
  10. End If
  11. file = dir
  12. Loop
  13. Application.Quit
  14. End Sub