Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Macro Issue using GetCell(row,col) method from API

We have just begun to test our applications in 9.0 and we have found an issue. We use the GetCell(0,1) function in our macros to get the value of a variable from an Input box. It works fine in 8.5 and below, but in 9.0 the cell containing the data is now (0,2). Meaning that if you use the GetCell(0,1) you will need to modify and use GetCell(0,2) in QV 9.0. It took us some time to find, so hopefully this will help someone.

I have included a test QV if you would like to see what values you get when. On QV 8.2, you should get 2 message boxes that display the cell values, and in QV 9.0 you will see three. The second cell (0,1) is now a null. (***** For some reason I cannot upload the file Sorry *****)

Thanks,

JS

2 Replies
disqr_rm
Partner - Specialist III
Partner - Specialist III

Why don't you use following for getting variable value?

set v = ActiveDocument.Variables("Variable1")
msgbox(v.GetContent.String)

Anonymous
Not applicable
Author

For some reason that does not work in the context I am using it in. The variable I am reading in has carriage returns in it, and it does not like it. It maybe that I am not doing something right down farther but I have the solution above and will stick with it until I have more time to look. I am just perplexed at why it changes from version to version.

Thanks,

JS