Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

read excel data

Status
Not open for further replies.

Trumpet2

Technical User
May 8, 2014
2
US
I'm using Extra and I have a column of data 1500 +/- records. I want to retrieve the first record place it in the extra session run my application in extra. Then retrieve the next record and so on till finished. Is there a way to do this from extra with VB.
 
Hi,

Do you have 1500 rows ON ONE SCREEN, or something else?

Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]
 
Skip I have a Excel spreadsheet with 1500 items in column a so I have cell a1 to cell a1500. I have to take each items# and place in a extra application then retrieve that item and close it out. It is very time consuming. I want to write something to automate this act. I can do the macro for the extra application but am having trouble doing the call to excel to retrieve the individual item numbers.

Thanks
 
Since you are using Excel as the data source, AND I'd guess the place to put what you get out of the terminal emulator, I'd code the entire thing in Excel VBA, which is like a Cadillac compared to Extra VB, which is like a Yugo!

Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]
 
Anyhow, I assume that you have Set an object variable using the CreateObject("Excel.Application") an then opened the workbook containing your list.

So to loop thru the list in Excel...
Code:
With xl.workbook(1).worksheet(1).cells(1,1).currentregion
   For each r in .range(.cells(1,1), .cells(.rows.count,1))
       'r.value is a value in the list
   Next
End with

Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top