Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Exoprt to excel by authorized users

Hi all!!

I'm not familiar with macros at all! (unfortunatlly, not even the basics..)

I need a button that will export a table to excel. The table is stored in a container (if it is possible to the macro to recognaize which table is activated and should be exported, else the table will stand alone).

In addition to the export, I need the excel to be saved in a specific folder (NOT just opend).

And last, I want that only authorized users will be able to activate the button, OR that only authorized users will be able to export ALL fileds, and others will be able to export just specific fields.

I attached a QV where I tried to export a table wuth a macro (button) but somehow I couldn't make it to work.

Any help is welcomed!!

Thank you in advance.

17 Replies
Not applicable
Author

It's working! I had to changed the security properties.. Thank you so much!!!!

Now I have a question about the visability of the button.

Any chance you can help also with that issue?

ali_hijazi
Partner
Partner

yes of course

I can walk on water when it freezes
Not applicable
Author

I need the button (that activatets the macro) to be clickable/visible only for some users.

I don't want to use the expression Osuser(), I want to use premission from an existing  Active Directory group.

Any chance you know how?

Not applicable
Author

Thank you guys, But I need the button (that activatetsthe macro) to be clickable/visable only for some users.

I don't want to use the expression Osuser(), I want to use the premmision from an existing  Active Directory group.

Any chance you know how?

ali_hijazi
Partner
Partner

you need to add Section Access to your document

then have an excel sheet for example in which you specify the NTNAME and a Flag (1 or 0) 1 means the button is visible and 0 means the button is not visible and this is controlled in the Layout Tab of the button (conditional visibility)

I can walk on water when it freezes
Not applicable
Author

I'm sorry, I think I wasn't that clear.

I'm looking to add to the macro a script that will check if a user is in a specific Active Directory Group - If so, the macro will continue and the user will be able to export the object to excel (with the script you sent me). If not - the user won't be able to export (If we can through an error message to the user it will be great).

I'm trying to do that instead of making the button invisible for a non authorized users.

ali_hijazi
Partner
Partner

you can get the group to which each user belongs to and add a flag of 1 or 0 next to each group and depending on whether the flag is 1 or zero that macro is executed or not

I can walk on water when it freezes
robynrshields
Contributor III
Contributor III

Hi Hagit,

I'm having the same issue when I click the button to export to Excel  it opens the window "edit module" instead of exporting to excel.  Which security setting did you change to get this to work?  Thanks in advance.