Running script on all columns in excel/VBA -


so, have http put request need run on large amount of data. (50,000+ cells)

all of contained in 2 rows, , 25,000 columns. first row http url put to, second data part of larger string request.

assuming first 2 columns of sheet follows, cells separated via comma

location1, sample data 1 location2, sample data 2 

i sending put request domain.com/api/location1 containing string "data=sample data 1" "domain.com/api/" constant , "data=" constant.

not knowing enough excel, created button call code. still figuring out how insert cell data code.

private sub commandbutton1_click()  url = "https://domain.com/api/location1"  data = "here_is_a_long_string_specifying_the_value_to_modify=sample data 1"    set http = createobject("microsoft.xmlhttp")    http.open "put", url, false    http.setrequestheader "content-type", "application/x-www-form-urlencoded"    http.send request  end sub 

ultimately url = ""(1,x)

then proceed through list (1,1) 1,2 , 1,3, etc..

i unsure direct searches @ point

if understand correctly, might help:

getting cell data in excel vba:

cells(rowindex,columnindex).value  url = "https://domain.com/api/" & cells(1,1).value data = "yaddayadda=" & cells(2,1).value 

add loop this, , u're go:

for = 1 cells(1, 1).end(xltoright).column 'assuming cells continously filled  url = "https://domain.com/api/" & cells(1, i).value  data = "yaddayadda=" & cells(2, i).value next 

the

cells(1, 1).end(xltoright).column 

part finds column number of last filled cell starting cell a1, going right.

hope helps, , didn't misunderstand question. :)


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -