Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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

Re: Help with Excel Export

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 ....

2 Replies
Not applicable

Re: Help with Excel Export

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

Re: Help with Excel Export

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.