Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!!!
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
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.
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 !!
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
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"?