我有一个CSV表, 想用CSV增加一列, 报错:含有数据的表不支持的操作, 大*神帮忙看看
Sub sub_11()
Set cnn = CreateObject("adodb.connection")
Set Sql = CreateObject("adodb.recordset")
cnn.Open "Provider=Microsoft.ace.Oledb.12.0;Extended Properties=TEXT;data source=" & ThisWorkbook.Path & "\"
Sql = "alter table [mydata.csv] add abc int "
Set rs = cnn.Execute(Sql)
'rs.close
cnn.Close
Set rs = Nothing
Set cnn = Nothing
End Sub
csv不支持,因为这个txt引擎是只读的
你要增加列,只能自己重新用 open file xxx for write 重写文本文件