CodePudding user response:
OpenDialog1. InitialDir:=Path;OpenDialog1. Filter:='Text Files (*.txt) | *. TXT | All Files (*. *) | *. *';
If OpenDialog1. Execute then
Path1:=OpenDialog1 FileName
The else
The begin
Path1:=';
exit;
end;
AssignFile (Fname, Path1);
Reset (Fname);
J:=0;
While (not Eof (Fname)) And (j & lt; PN) do
The begin
For I:=0 to 0 do
Read (Fname, depthaa [j] [I]);
Showmessage (' tongguo ');
For I:=1 To NdNum [0] Do
Read (Fname, xp [j] [I]);
This is part of the code
CodePudding user response:
Can build a stringlist variables, TXT files loaded, loop out 4 rows of data saved in the temporary database,CodePudding user response:
Agree with upstairs,Use TStringList most convenient, the four columns in the line of values can be in the form of a subscript, such as MysList [0], is a string type, and then you to convert the types and corresponding calculation, so the premise is if is calculated with a row,
If an inter-bank data calculation, such as the sum of a column, can recycling,
If an inter-bank again more complicated calculation, it is better to loop over the processing to the table, and then use the database to do
Don't know what do you want to do, so all sorts of situations are said to you