Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm creating qvd file through macro code for straight table using ExportEx function. But, the qvd file containing all hidedcolumns also along with data, i want only visible columns.
Code which i'm using is:
Sub Qvd
Set obj=ActiveDocument.GetSheetObject("CH01")
obj.ExportEx "D:\TestQlikViewExamples\A.qvd",4
End Sub
- When i create qvd using Export function i'm not getting hided columns.
Code which i'm using is:
Sub Qvd
Set obj=ActiveDocument.GetSheetObject("CH01")
obj.Export "D:\TestQlikViewExamples\A.qvd",";"
End Sub
Can any one helpme how to overcome with ExportEx.
Hi
One way to handle this is to create a hidden table with the columns you want exported and export this table instead of the one displayed I have used this to add extra columns to the export, but you could also exclude columns that are hidden on the displayed table.
Hope that helps
Jonathan
Jonathan Dienst,
I didn't get what you said can you help me little bit. What i understood for explaintion is that you want to create hidden table and export it. But wt is the use of it.
Can you explain me with example file. For your reference i'm attaching my sample qvw file.
Hi
Sorry, can't do an example right now.
The hidden table is similar to the displayed table (eg same dimensions), but can contain a different set of expressions. You want to exclude certain expressions from the export because they are hidden in the display version. On the hidden table you can omit those fields so they will not be exported. Just change the object ID in the GetsheetObject method to the object ID for the hidden table.
Jonathan
Jonathan Dienst,
But my straight table hides the columns depending on previous sheet selections. The table will not be constant every time.
For eg:
I've a listbox with field Group which contains the data A,B,C,D
The straight table contains the dimensions with A,B,C,D etc..
If i select A,B in the lisbox then the straight table shows with columns A,B only. If i select B,D next time it will shows B,D only.
It seems to me that you will need to write a macro Sub/Function that reads the list box and adds/removes columns (note not hide, but remove) from the hidden box according to the list box selection(s). You could call this sub or function before calling the ExportEx method.
I don't have code for this approach as I have usually managed to steer my users/clients away from such an approach, but use the API guide and search here for code reading values off a list box and code showing/hiding columns in a straight table.
Jonathan
Yes you are right we should remove the field which is hidded field in the tablebox and den we should call ExportEx method. But if i use remove function it will remove permanently from the box object. I don't want to remove the field because it will create a problem for next time if i choose removed field in the listbox. What i'm saying is if i choose removed field in the listbox and goes to the output. Here, i'm not able to see that field whic i selected in the listbox b'coz it is already removed.