產生Excel後的疑問 |
答題得分者是:william
|
senix
一般會員 發表:28 回覆:25 積分:10 註冊:2002-03-15 發送簡訊給我 |
各位前輩
我用D6完成了一個.XLS的Excel檔並指定符號區隔,
且也能直接呼叫,但結果卻如同TXT一般沒有依儲存格切割,
可是若經由Excel應用程式開啟就可以正常選擇切割符號,
真奇怪..為什麼?要加些什麼指令嗎?? ==直接呼叫程式如下===
:
(取資料)
:
Coinitialize(nil);
vatMSTool := CreateOleObject('Excel.Application');
strFD :=strFile;
vatMSTool.WorkBooks.Open(strFD);
vatMSTool.Application.Visible := True;
====================== 另外,正常開啟後雖可以選切割符號,
但為避免選錯,可否加入控制直接選取規定符號來切割,
不由User任意決定...謝謝
|
william
版主 發表:66 回覆:2535 積分:3048 註冊:2002-07-11 發送簡訊給我 |
Extracted from the help (VBAXL9.CHM in Office 2000) in Excel 2000 (Application.Workbooks): OpenText Method
Loads and parses a text file as a new workbook with a single sheet that contains the parsed text-file data. Syntax OpenText(Filename, Origin, StartRow, DataType, TextQualifier, ConsecutiveDelimiter, Tab, Semicolon, Comma, Space, Other, OtherChar, FieldInfo, DecimalSeparator, ThousandsSeparator) OpenText Method Example This example opens the file Data.txt and uses tab delimiters to parse the text file into a worksheet. Workbooks.OpenText filename:="DATA.TXT", _
dataType:=xlDelimited, tab:=True
|
senix
一般會員 發表:28 回覆:25 積分:10 註冊:2002-03-15 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |