+1serge_girard wrote: ↑Fri Dec 01, 2017 9:10 am Rajaeev,
You can start with this code:
<snip code>
Serge
I use similar logic in my import data from csv programs.
Rajeev, I will advise to use Serge's logic instead of memoread.
Regards,
Anand
Moderator: Rathinagiri
+1serge_girard wrote: ↑Fri Dec 01, 2017 9:10 am Rajaeev,
You can start with this code:
<snip code>
Serge
Hi BeGeSBeGeS wrote: ↑Thu Nov 30, 2017 6:29 pmFor those things I prefer to use the functions FOPEN() - FREADSTR() - FSEEK() - FCLOSE(). I have never used MEMOREAD(). But I'll tell you what I would do in your case.RPC wrote: ↑Thu Nov 30, 2017 11:59 am Hi everybody
I want to search a string(CSV file) read throuh memoread(CSV file) function.
I have to search a Code and then jump back a few commas to retrieve a value.
For eg
Consider the enclosed EQ_ISINCODE_291117.CSV file. In this I want search say code "INE885A01032" after searching that I want to jump back 6 commas to get value 804.75. To search code "INE885A01032" I use AT() function but do not know how to jump back 6 commas to get value of 804.75
Can anybody help ?
TIA
Rajeev
PS-Please note it not jpg file, please rename the file as EQ_ISINCODE_291117.CSV instead of jpg extension.
Let's suppose that the string that returns MEMOREAD() we call it cCODE.
Then we could do like this:
This is only an idea. You have to be sure that within cCODE is the code you are looking for. And as for the commas, it may be six or seven, depending on whether you are counting the comma that precedes the INE8... code.Code: Select all
FOR H:=1 TO (LEN(cCODE)-11) IF SUBSTR(cCODE, H, 12)=="INE885A01032” K:=H EXIT ENDIF NEXT COMMAS:=0 FOR H:=K TO 1 STEP(-1) IF SUBSTR(cCODE, H, 1)==”,” COMMAS+=1 ENDIF IF COMMAS==6 J:=H EXIT ENDIF NEXT PRICE:=VAL(SUBSTR(cCODE, J+1, 6))
Hi Esgiciesgici wrote: ↑Fri Dec 01, 2017 11:37 am Hi Rajaeev
As you seen there isn't anything inexhaustible under the sun
All advice of our friend are applicable and useful.
By the way, did you inspect this article ?
https://vivaclipper.wordpress.com/2014/ ... unctions/]
Regards