search in a spreadsheet? - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: search in a spreadsheet? (/thread-7886.html) |
search in a spreadsheet? - Onieh - 03-06-2017 12:23 PM 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 RE: search in a spreadsheet? - Carlos295pz - 03-06-2017 02:32 PM Try this: Code: Rw:=POS(a:a,"EDLK"); Care with the number format, use Rw: = STRING (Rw, 1) RE: search in a spreadsheet? - Onieh - 03-06-2017 03:27 PM (03-06-2017 02:32 PM)Carlos295pz Wrote: Try this: 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; RE: search in a spreadsheet? - Carlos295pz - 03-07-2017 01:22 AM An alternative Code: EXPORT Navigation() |