Post Reply 
search in a spreadsheet?
03-06-2017, 12:23 PM (This post was last modified: 03-06-2017 03:28 PM by Onieh.)
Post: #1
search in a spreadsheet?
Hallo,

how can i search in a spreadsheet with a loop data search an then take the data in a new program?

Example:

Search EDLK

Spreadsheet:
A B C D E F ...
1 EDAG 122.458 94.0124 7.8756
2 EDHJ 121.354 93.4536 7.125
3 EDLK 120.050 93.1547 7.024
4 EDOP 123.012 92.0124 7.698
an so on

Find EDLK in A3 an then Print A3, B3, C3, D3 also EDLK 120.050 93.1547 7.024

EXPORT Navigation()
BEGIN
LOCAL I,A,B,C,D,E;
PRINT();
STARTAPP("Flugplatz");
I:=1;
FOR I FROM 1 To 10 Step 1 DO

PRINT (A(I));
// PRINT (B(I));
//PRINT (C(I));
//PRINT (D(I));
//PRINT (E(I));
END;
FREEZE;
END;

I hope, you can understand this!?

Best Regards Heino
Find all posts by this user
Quote this message in a reply
03-06-2017, 02:32 PM
Post: #2
RE: search in a spreadsheet?
Try this:

Code:
Rw:=POS(a:a,"EDLK");
VRw:=EXPR(Rw+":"+Rw);

Care with the number format, use Rw: = STRING (Rw, 1)

Viga C | TD | FB
Visit this user's website Find all posts by this user
Quote this message in a reply
03-06-2017, 03:27 PM (This post was last modified: 03-06-2017 07:59 PM by Onieh.)
Post: #3
RE: search in a spreadsheet?
(03-06-2017 02:32 PM)Carlos295pz Wrote:  Try this:

Code:
Rw:=POS(a:a,"EDLK");
VRw:=EXPR(Rw+":"+Rw);

Care with the number format, use Rw: = STRING (Rw, 1)

I mean this one, but its a mistake!

EXPORT Navigation()
BEGIN
LOCAL I,A,B,C,D,E;
PRINT();
STARTAPP("Flugplatz");
I:=1;
FOR I FROM 1 To 10 Step 1 DO

PRINT (A(I));
// PRINT (B(I));
//PRINT (C(I));
//PRINT (D(I));
//PRINT (E(I));
END;
FREEZE;
END;

Great, thanks Carlos.
The first problem is solved,
now the second one.

Here the solution:

EXPORT Navigation()
BEGIN
LOCAL I,A,B,C,D,E;
RECT();
STARTAPP("Flugplatz");
I:=1;
FOR I FROM 1 To 10 Step 1 DO
TEXTOUT_P((EXPR("A"+I)),0,20);
TEXTOUT_P((EXPR("B"+I)),50,20);
TEXTOUT_P((EXPR("C"+I)),130,20);
TEXTOUT_P((EXPR("D"+I)),190,20);
TEXTOUT_P((EXPR("E"+I)),260,20);
// PRINT (EXPR("A"+I));
// PRINT (EXPR("B"+I));
// PRINT (EXPR("C"+I));
// PRINT (EXPR("D"+I));
// PRINT (EXPR("E"+I));
WAIT(2); RECT();
END;
FREEZE;
END;
Find all posts by this user
Quote this message in a reply
03-07-2017, 01:22 AM
Post: #4
RE: search in a spreadsheet?
An alternative

Code:
EXPORT Navigation()
BEGIN
 LOCAL Rw,VRw,Cx={0,50,130,190,260};
 STARTAPP("Flugplatz");
 WHILE INPUT({{Rw,a:a}}) DO
  LOCAL RwF=STRING(Rw,1); //Format
  VRw:=EXPR(RwF+":"+RwF);
  RECT;
  ITERATE(X+1+0*TEXTOUT_P(Cell(Rw,X),Cx(X),20),X,1,5);
  WAIT(-1)
 END
END;

Viga C | TD | FB
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)