How To Call A Specific Cell From An Excel Database? Follow

0
Avatar
Legacy Poster

Sorry for the dumb question, but how do i call a specific value from Excel Database? I mean, for example:

 

Excel Table:

 

Number          Name

1234              John

5678              Oscar

0987              Walter

 

If i want to create a variable with Walter as value, how do i do that?

 

Dim Someone

Someone = Field(??????????)

2 comments

0
Avatar
Legacy Poster
Comment actions Permalink

I'm not 100% sure this is what you're asking but maybe.

 

[attachment=1512:Capture.JPG]

 

If you're asking how you tell BarTender to look at record 3 *always*, no matter what record you're currently printing, I don't think that's a thing.

0
Avatar
Legacy Poster
Comment actions Permalink

Yeah, that didn't work for what i want. Actually what i need right now is to create an Array and call all the values from a table to it. Like for example

 

Supposing that i have an excel Table like  the one i put in the last post. I want to transform those two columns (number and name) in two arrays, so:

 

 

Dim number(2)

   For each x in number

        If  x = Null Then

            Exit For

        Else

            x = Field(Sheet1$.number)

        End if

    next

 

Dim name(2)

    For each x in name

        If  x = Null Then

            Exit For

        Else

            x = Field(Sheet1$.name)

        End if

    next

 

I tried that, but doesn't work... I also tried " x = Field(Sheet1$.name).movenext" , but i'm not pretty sure what i'm doing, and doesn't work neither...

Please sign in to leave a comment.