How to save semi-colon delimited csv file using VBA?

后端 未结 6 1867
轮回少年
轮回少年 2020-12-03 08:10

I copy data into a spreadsheet, use VBA to format it, then save that sheet into a CSV file.

I use the following code:

ws.SaveAs Filename:=filestr, Fi         


        
6条回答
  •  半阙折子戏
    2020-12-03 08:43

    No need to declare all this variables, just add local:=true in the end of your SaveAs method, like so:

    ActiveWorkbook.SaveAs Filename:="C:/Path/TryMe.csv", FileFormat:=xlCSV, Local:=True
    

提交回复
热议问题