EXCEL中VBA 输出到TXT文件中的问题!
PrivateSubCommandButton1_Click()DimcAsRangeKillThisWorkbook.Path&"\data.DXF"OpenThisW...
Private Sub CommandButton1_Click()
Dim c As Range
Kill ThisWorkbook.Path & "\data.DXF"
Open ThisWorkbook.Path & "\data.DXF" For Append As #1
For Each c In Worksheets("DXF").Range("H2:H213")
Print #1, c.Value
Next
For Each c In Worksheets("DXF").Range("I2:I11")
Print #1, c.Value
Next
Close #1
End Sub
在H2:H213单元格中有数字和汉字,其中输出到TXT文件中,数字前后有空格,如何去掉数学的前后空格? 展开
Dim c As Range
Kill ThisWorkbook.Path & "\data.DXF"
Open ThisWorkbook.Path & "\data.DXF" For Append As #1
For Each c In Worksheets("DXF").Range("H2:H213")
Print #1, c.Value
Next
For Each c In Worksheets("DXF").Range("I2:I11")
Print #1, c.Value
Next
Close #1
End Sub
在H2:H213单元格中有数字和汉字,其中输出到TXT文件中,数字前后有空格,如何去掉数学的前后空格? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询