Save as CSV with semicolon separator

后端 未结 6 1286
庸人自扰
庸人自扰 2021-01-17 17:06

I\'m currently use this function for saving, but I have a problem with it:

Private Sub spara()
    ActiveWorkbook.SaveAs Filename:=\"T:\\filepath+ ActiveWork         


        
6条回答
  •  青春惊慌失措
    2021-01-17 17:21

    It's quite possible this problem is not solvable using Excel VBA only. The problem is, while Excel Save As... uses machine locale define list separator value, Excel VBA always uses en-US locale, thus, it always uses , as a list separator.

    I would recommend saving a CSV and then use custom console app/script for postprocessing. There is plenty of CSV parsers available which can read a ,-csv and then save it as ;-csv.

提交回复
热议问题