Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Macro through server

Hi guys, i've built a macro to copy a table from qlikview and put it into excel. When i open the document using 'open in server' it simply opens excel and doesn't do anything more. Can anyone help me?

Labels (1)
5 Replies
Anonymous
Not applicable
Author

Sorry - should have been clearer. When i run the macro using 'open in server' it simply opens excel and doesnt do anything more.

Not applicable
Author

Hi ,

      How is differ from Eport to Excel functionality ?

Please reply me the same.

//Yusuf

Anonymous
Not applicable
Author

Sorry i dont really undersand what you mean. Here is the code i'm using

Sub Export_to_spreadsheet

ActiveDocument.ClearAll true

'ActiveDocument.GetSheetObject("CH336").restore

     'Set the path where the excel will be saved

    filePath = "H:\TestBB.xls"

     'Create the Excel spreadsheet

     Set excelFile = CreateObject("Excel.Application")

     excelFile.Visible = true

     'Create the WorkBook

     Set WorkBook = excelFile.WorkBooks.Add

     'Create the Sheet

     Set Sheet = WorkBook.WorkSheets(1)

     'Get the chart we want to export

     Set tableToExport = ActiveDocument.GetSheetObject("CH327")

     Set chartProperties = tableToExport.GetProperties

     tableToExport.CopyTableToClipboard true

     'Get the caption

     chartCaption = tableToExport.GetCaption.Name.v

     'MsgBox chartCaption

     'Set the first cell with the caption

     Sheet.Range("A1") = chartCaption

     'Paste the rest of the chart

     Sheet.Paste Sheet.Range("A2")

     excelFile.Visible = true

ActiveDocument.GetSheetObject("CH327").minimize

     'Cleanup

     Set WorkBook = nothing

     Set excelFile = nothing 

Not applicable
Author

Hi ,

      As you said you are performing macro on Server just wanted to check have you tried this macro on your Local machine ( Desktop) . If it is working fine then i think there might be Compability of some macros to run on server ..

But i'm not sure .

Please reply me for the same.

brindlogcool
Creator III
Creator III

Hi Paul,

It is old post. I am having the same issue. Would like to understand if you got any solution on this issue.