Jump to content
Sign in to follow this  
Brenda1

Get separated fields from _FileReadToArray function

Recommended Posts

Brenda1

Hello guys, can someone help me with this:

I have this code:

_FileReadToArray ( "HRInfo.csv", $barray )

$Pos = _ArraySearch ($barray, $Name, 0, 0, 0, True)
                    Select
                        Case $Position = -1
                            MsgBox(0, "Not Found", '"' & $Name & '" was not found in the array.')
                        Case Else
                            MsgBox(0, "Found", '"' & $Name & '" was found in the array at pos ' & $Pos & ".")
                            MsgBox(0,"",$barray[$Pos])
                    EndSelect

as you can see, if the entry is found I got the position in the array, and the stored information in that position is something like this: employeeNumber;EmployeeName, I want to separate this information, in a different variable like this:

$var1= employeeNumber
$var2=EmployeeName.

any advice??? :D

Share this post


Link to post
Share on other sites
weaponx

any advice??? :D

Heres some advice, don't create a new topic when I provided the answer for you in an existing topic.

Share this post


Link to post
Share on other sites
Brenda1

Heres some advice, don't create a new topic when I provided the answer for you in an existing topic.

yes, sorry about that, but I didn't see the answer after create a new post. :D I found the solution and put it in the other post!

thanks

Edited by Brenda1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×