文本如下(很奇怪前面几行中间的数据看不到), 谁能够告诉我原因, 也可以
F1, F2, F3, F4, F5, F8, F9, F10, F11
Product:,NS 100-250A 3P,,Line:,C1,,LS(autre),,,,
CP No.,1CP20P1P2-3P,,,Tool No.,S1CCO 085,LI(autre),,,,
Checked Parameter,,,Position of SD garde.,,,LCSup.,8.76,,,
Designing Criteria,,6.50 Mini,,,,LCInf.,6.96,,,
1-Mar-99,7.79 ,7.69 ,7.77 ,7.79 ,7.74 ,,38.78,7.76,0.10,
2-Mar-99,7.64 ,7.72 ,7.64 ,7.71 ,7.70 ,,38.41,7.68,0.08,
3-Mar-99,7.70 ,7.71 ,7.70 ,7.63 ,7.70 ,,38.44,7.69,0.08,
3-Mar-99,7.86 ,7.71 ,7.78 ,7.66 ,7.75 ,,38.76,7.75,0.20,
4-Mar-99,7.79 ,7.76 ,7.73 ,7.73 ,7.64 ,,38.65,7.73,0.15,
5-Mar-99,7.79 ,7.72 ,7.80 ,7.71 ,7.77 ,,38.79,7.76,0.09,
F1, F2, F3, F4, F5, F8, F9, F10, F11
Product:,NS 100-250A 3P,,Line:,C1,,LS(autre),,,,
CP No.,1CP20P1P2-3P,,,Tool No.,S1CCO 085,LI(autre),,,,
Checked Parameter,,,Position of SD garde.,,,LCSup.,8.76,,,
Designing Criteria,,6.50 Mini,,,,LCInf.,6.96,,,
1-Mar-99,7.79 ,7.69 ,7.77 ,7.79 ,7.74 ,,38.78,7.76,0.10,
2-Mar-99,7.64 ,7.72 ,7.64 ,7.71 ,7.70 ,,38.41,7.68,0.08,
3-Mar-99,7.70 ,7.71 ,7.70 ,7.63 ,7.70 ,,38.44,7.69,0.08,
3-Mar-99,7.86 ,7.71 ,7.78 ,7.66 ,7.75 ,,38.76,7.75,0.20,
4-Mar-99,7.79 ,7.76 ,7.73 ,7.73 ,7.64 ,,38.65,7.73,0.15,
5-Mar-99,7.79 ,7.72 ,7.80 ,7.71 ,7.77 ,,38.79,7.76,0.09,
var
R: PString;
P, S: PChar;
begin
if Length(Source) = 0 then Exit;
R := @Data;
P := PChar(Source);
S := P;
while True do
begin
if P^ = SplitterChar then
begin
SetString(R^, S, P - S);
Inc(R);
S := P + 1;
end;
Inc(P);
if P^ = #0 then
begin
SetString(R^, S, P - S);
break;
end;
end;
end;var
V: array [0..FieldCount] of string;for I := 0 to List.Count - 1do
begin
Extract(List[I], V);
...
end;
我发现用了 ADO 的 Jet 引擎后, 它把F2 至于 F8 都认作FloatField, 所以上面几行数据都看不到, 大家都帮我试一下看看有什么办法, 让ADO 不用FloatField, 全部看看成 StringField 或者 WideStringField具体连接是 选择 Jet Provider, 数据源输入文本文件所在的路径, 在 All 栏里面的Extended Propertied 设为 Text, 就可以了,
[aaa.txt]
ColNameHeader=False
Format=Delimited(,)
MaxScanRows=25
CharacterSet=ANSI
Col1=F1 Char Width 255
Col2=F2 Char Width 255
Col3=F3 Char Width 255
Col4=F4 Char Width 255
Col5=F5 Char Width 255
Col6=F6 Char Width 255
Col7=F7 Char Width 255
Col8=F8 Char Width 255
Col9=F9 Char Width 255
Col10=F10 Char Width 255
Col11=F11 Char Width 255
[schema.ini]
ColNameHeader=False
Format=CSVDelimited
MaxScanRows=25
CharacterSet=OEM用法:
select * from aaa.txt
谢谢, 那么对于Excel 文件, schema.ini 怎么设置, 有没有相关文档, 能否发给我谢谢
有的数据是在ADO中显示不出来的;
除非先设定excel每一列的属性,再输入数据才可以显示出来
很感谢ghao0(干什么) , 不过向你说声对不起, 我所有的分数就这 40 分了,
等我分涨上去再说, 但这四十分是你的,
实在不好意思, 因为急, 不给高分又没人答, 抱歉了,
对于Excel 的 schema.ini 哪位高手有例子给一个多谢了