Saving a Excel File into .txt format without quotes

前端 未结 8 853
攒了一身酷
攒了一身酷 2020-11-28 13:44

I have a excel sheet which has data in column A.There are many special characters in the cells.When I save the sheet in .txt format I get inverted commas at the start of eac

8条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-28 14:05

    I was using Write #1 "Print my Line" instead I tried Print #1, "Print my Line" and it give me all the data without default Quote(")

    Dim strFile_Path As String
    strFile_Path = ThisWorkbook.Path & "\" & "XXXX" & VBA.Format(VBA.Now, "dd-MMM-yyyy hh-mm") & ".txt"
    Open strFile_Path For Output As #1
    
    Dim selectedFeature As String
    
    For counter = 7 To maxNumberOfColumn
    
            selectedFeature = "X"
            Print #1, selectedFeature
            'Write #1, selectedFeature
    
    Next counter
    Close #1
    

提交回复
热议问题