Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a straight table and am using macro to export it to excel along with some other objects.it is working fine. Now i need to exclude 2 columns from the straight table while exporting?? is that possible ??
please suggest ??
Thanks in advance
Reena
Hello Reena,
It is possible. I will recommend you to use inbuilt actions of Qlik rather than using macro. Well you can use a coppy the same Straight table with condition of excluding that two columns and let that be Hidden.
Hi,
As Sujit suggested,
Case 1 :Please take a copy of the existing straight table and in the copy application just hide whatever columns you dont want to export.
Note : Change the object Id in the macro script(as per your macro written).Other wise it will export original straight table only.
Sujit : Could you help me how we can achieve this without macro.(I dont know this)
Regards,
Ajay
Exporting an object to excel. You can use action defined export objects
hello..
Thanks fo your reply..
Actually i have to use macro,since i have to export the entire sheet objects to a single sheet. please help me with avoiding the fields
Hi Reena,
Then you should use one more straight table excluding those two fields as Sujeeth suggested and that will be hidden. But the macro will export the hidden straight table which doesn't have those two fields.
Cheers,
Naresh
Hi,
May be this would be helpful.
As you Mentioned, already you have code for export to excel. You can add the below code
Sub RemoveDimension
set obj = ActiveDocument.GetSheetObject("CH03")
obj.RemoveDimension 0
obj.RemoveDimension 3
End Sub
After exporting to excel you can add the dimension.
Or you can just hide the dimension when you are exporting excel, then show the dimension.
Sub AddDimension
set obj = ActiveDocument.Sheets("CH03")
obj.AddDimension "Dimension1"
End Sub
Hi,
Hide the columns which you want to exclude by using the
Chart Properties -> Dimension -> Using Enable Conditional option of the dimension
Give some variable assume vShowDim
While triggering the macro add this events in the macro
Event 1: Action -> Add Action -> External -> Set Variable -> Set vShowDim to 0
Event 2: Call your macro here
Event 3: Action -> Add Action -> External -> Set Variable -> Set vShowDim to 1
Hope this helps you.
Regards,
Jagan.