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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan

macro question

Dear All

I have following macro to export qlikview object into excel  but it as me

save as dialog how do I avoid this saveas dialog in macro.

Thanks in advance

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try adding this line above the SaveAs line:

    XLApp.DisplayAlerts = False


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Miguel_Angel_Baeyens

Hi,

First, make sure the macros are allowed to access the filesystem in the Control + M macro editor dialog, bottom left hand side.

Second, make sure the UAC is disabled in the computer where you try to export, and that the file does not exist already, otherwise the macro should replace the file instead of just saving it.

Hope that helps.

Miguel

vikasmahajan
Author

Dear Miguel,

Thanks for Reply Please see the attached file showing dialog box while exporting macro I want to bypass

this system should overwrite file

any option to set ?

Regards

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try adding this line above the SaveAs line:

    XLApp.DisplayAlerts = False


talk is cheap, supply exceeds demand
vikasmahajan
Author

Thanks Works..

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
rohit214
Creator III
Creator III

Hi,

What should  i need to write for pdf , in place of XLapp?

I have Adobe Acrobat X standard for generating my PDF and my macro script is


sub printRP01

printReportPDF "C:\Users\rgupta27\Desktop\New folder\DWR.pdf"

ActiveDocument.GetApplication.Sleep 2000

ActiveDocument.PrintReport "RP01", "QlikViewPDF"

ActiveDocument.PrintReport "RP02", "DWR"

ActiveDocument.GetApplication.Sleep 10000

ActiveDocument.PrintReport pdfOutputFile, "QlikViewPDF", True

end sub

Function printReportPDF(pdfOutputFile)

Set WSHShell = CreateObject("WScript.Shell")

  WSHShell.RegWrite "HKCU\Software\QlikViewPDF\OutputFile", pdfOutputFile, "REG_SZ"

  WSHShell.RegWrite "HKCU\Software\QlikViewPDF\BypassSaveAs", "1", "REG_SZ"

Set WSHShell = nothing

End function

Regards

Rohit