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

后端 未结 5 390
遥遥无期
遥遥无期 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:14

    This seems to be an inherent 'problem' with vba and I believe the only solution is to format your date field to a text field prior to exporting, obviously change Selection to the actual range

    Sub convertToStr()
      Dim c As Range
    
      For Each c In Selection
        c.Value = "'" + CStr(c.Value)
      Next c
    
    End Sub
    

提交回复
热议问题