Excel 2007 Save worksheet as CSV differs to save worksheet as csv in VBA

后端 未结 5 392
遥遥无期
遥遥无期 2021-01-07 04:17

I have a problem working with some worksheets within a workbook from a 3rd party website source.

  • the spreadsheet is available at the 3rd party source website
5条回答
  •  广开言路
    2021-01-07 05:11

    When you face similar problems, Record Macro and compare the generated code to yours. Note that it uses Workbook.SaveAs instead

    For Each ws In wb.Worksheets
        ws.Activate
        wb.SaveAs Current_Directory & LCase(ws.Name) & ".csv", xlCSV ' check this line with Record Macro
    Next
    

提交回复
热议问题