Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Not applicable

Access Point Issue :Export To Excel Macro Not Working

Hello, I am using  VB Scrip as a Trigger to Export multiple sheets to Excel. The Macro works good on the desktop version but when i push the dashboard to Access Point nothing Happens.

Can anyone suggest how to resolve this issue or where to start?

VB Script:

----------------------------------------------------

sub launchXL

set oXL=CreateObject("Excel.Application")

oXL.visible=True

oXL.Workbooks.Add

aSheetObj=Array("CH02", "CH03", "CH04", "CH05", "CH06", "CH07", "CH08", "CH09")

for i=0 to UBound(aSheetObj)

oXL.Sheets.Add  

Set oSH = oXL.ActiveSheet

oSH.Range("A1").Select   

Set obj = ActiveDocument.GetSheetObject(aSheetObj(i))

obj.CopyTableToClipboard True

oSH.Paste

sCaption=obj.GetCaption.Name.v

set obj=Nothing    

oSH.Rows("1:1").Select

oXL.Selection.Font.Bold = True      

oSH.Cells.Select

oXL.Selection.Columns.AutoFit

oSH.Range("A1").Select    

oSH.Name=left(sCaption,30)  

set oSH=Nothing 

next

set oXL=Nothing

end sub

---------------------------------------------

Thanks!!!

5 Replies
mov
Esteemed Contributor III

Re: Access Point Issue :Export To Excel Macro Not Working

This macro requires system access.  It cannot work in AJAX, sorry...

Edit:  I just thought maybe you use IE Plugin.  In this case, it should work, but you have to allow "unsafe macro execution on server".  It is in System - Setup - QVS - Security

jonasheisterkam
Contributor III

Re: Access Point Issue :Export To Excel Macro Not Working

If youre Browser would communicate on this way with excel and other apps on your computer. Youre system security would have a hole you never able to close.

Not applicable

Re: Access Point Issue :Export To Excel Macro Not Working

We are using IE Plugin. unsafe macro execution on server is turned on . Still No luck.

Is there an alternative Script which i can use to bypass the security?

Thanks for the Quick Reply !!

jonasheisterkam
Contributor III

Re: Access Point Issue :Export To Excel Macro Not Working

If you have pogramming or skrpting skills in windows you can do it this way: Serverside Export all needed data with session and user Info. Run a script 24/7 wich look on the export folder and build the excelfile in the Webserver folder. In QlikView use a macro or a now() funktion to check if a time like 20sec is gone and then show a button with the link to the file.   filename like osname_exporttime.xls

mov
Esteemed Contributor III

Re: Access Point Issue :Export To Excel Macro Not Working

In fact, I have an application with macros, including Excel export, running on QVS.  Works fine in IE Plugin, no workaround needed.  The Server doesn't even have Excel installed.

Is the "allow macro execution on server" checked?  Besides "unsafe"?

Community Browser