Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with Excel Export

Hello all,

I am new to QlikView and VB Scripting. I have a sheet with several Conditional Hidden fields, and different data displays depending on values selected. I am putting an Excel Export button on the sheet to export the data that is visible at the time, however I am not sure of how to set up the VBScript syntax in order to only grab only the fields that are visible. Is there any functionality or parameter I can use in an If condition to get what I need?

*if field Id is visible = true * <-- How do i do this???

Then

ActiveDocument.GetSheetObject("field Id").CopyTableToClipboard true

XLApp.Worksheets(1).Range("A1").Select()

XLApp.Worksheets(1).Paste()

Thank you.

BK

1 Solution

Accepted Solutions
Not applicable
Author

Fields can not be visible or invisible because they're data model. Perhaps the "visibility" you need to check is defined by variables. Values of the variables can be checked like this:

set v = ActiveDocument.Variables(var)

val = v.GetContent.String

if val=.... then ....

View solution in original post

2 Replies
Not applicable
Author

Fields can not be visible or invisible because they're data model. Perhaps the "visibility" you need to check is defined by variables. Values of the variables can be checked like this:

set v = ActiveDocument.Variables(var)

val = v.GetContent.String

if val=.... then ....

Not applicable
Author

Your suggestion was very helpful. Thank you.

I had to create a variable  and use the GetContent.String in order to manipulate what is exported.

Thanks again.