T txz123 Unregistered / Unconfirmed GUEST, unregistred user! 2003-09-25 #1 我想将一个文本文件的内容用delphi写入excel,听说有很简单的方法,请指教.
D dx2527 Unregistered / Unconfirmed GUEST, unregistred user! 2003-09-26 #3 请看: http://www.delphibbs.com/delphibbs/dispq.asp?lid=1691966 然后再看: http://www.delphibbs.com/delphibbs/dispq.asp?lid=203496
请看: http://www.delphibbs.com/delphibbs/dispq.asp?lid=1691966 然后再看: http://www.delphibbs.com/delphibbs/dispq.asp?lid=203496
A app2001 Unregistered / Unconfirmed GUEST, unregistred user! 2003-09-26 #4 先将文本读入字符列表tsList.Text,然后读入内存,直接粘贴上去就行了 Clipboard.AsText := tsList.Text; ExcelWorksheet1.Paste; ExcelWorksheet1.SaveAs(filename);
先将文本读入字符列表tsList.Text,然后读入内存,直接粘贴上去就行了 Clipboard.AsText := tsList.Text; ExcelWorksheet1.Paste; ExcelWorksheet1.SaveAs(filename);
T txz123 Unregistered / Unconfirmed GUEST, unregistred user! 2003-09-27 #5 写程序是没有问题的,就是想要利用一下EXCEL的VBA编程.我的文本文件格式如下: 1|2|3|4 4|5|6|7 用OLE调用EXCEL去打开这个文本,EXCEL如何识别"|"是分割符,具体参数如何?
写程序是没有问题的,就是想要利用一下EXCEL的VBA编程.我的文本文件格式如下: 1|2|3|4 4|5|6|7 用OLE调用EXCEL去打开这个文本,EXCEL如何识别"|"是分割符,具体参数如何?
心 心随风 Unregistered / Unconfirmed GUEST, unregistred user! 2003-09-28 #6 这是我录制的宏打开文件的过程,主要是其他分割符选“|“。 你自己再研究。
心 心随风 Unregistered / Unconfirmed GUEST, unregistred user! 2003-09-28 #7 Workbooks.OpenText Filename:="C:/123.txt" _ , Origin:=936, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _ xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, _ Comma:=False, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _ Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1)), TrailingMinusNumbers:= _ True
Workbooks.OpenText Filename:="C:/123.txt" _ , Origin:=936, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _ xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, _ Comma:=False, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _ Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1)), TrailingMinusNumbers:= _ True
T txz123 Unregistered / Unconfirmed GUEST, unregistred user! 2003-09-29 #8 输入Workbooks.OpenText('C:/123.txt',936,1,xlDelimited,xlDoubleQuote, False, False, False,False,False, True, '|',Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1)), True);出错.expression expected but "Array" found; ')'expected but ',' found;
输入Workbooks.OpenText('C:/123.txt',936,1,xlDelimited,xlDoubleQuote, False, False, False,False,False, True, '|',Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1)), True);出错.expression expected but "Array" found; ')'expected but ',' found;