Export Qlikview report to Excel - vbscript

I have created a Qlikview report that I would like to export to a Excel spreadsheet. The report has 8 sheets/tabs and navigation functionality on all. After some research I found that I need to create a button on the report that executes a macro.
Having the limited experience in Qlikview as I do, I was only able to go as far as to create the button.
Could anyone please point me in the right direction or better yet, provide me with a macro.

You need to set an action on the button and select external - run macro.
In the macro name field you type the name of your macro function/subroutine (in this case "MacroTest").
By pressing "Edit module..." you can access the macro edit mode (or by pressing Ctrl + M)
sub MacroTest
msgbox("macro")
end sub
Press the button and a message box will appear.
Regarding excel exports there are a lot of working examples you can find by google.
Good luck
//Micke

Related

vbscript to change protectet view mode to edit or normal mode

I have automated VB script and it will be do the following tasks:
It will allow user choose the excel sheet
Inserts the macros into chosen excel sheet
Export (SaveAs) into .xls format (which has macros)
But the problem is step (1), all Excel sheets are in "protected View". Every time I have to change the protected view to edit mode manually then move further. Is there any way that I can change this setting through VB script only to avoid manual intervention?
Please advise. Thanks in advance.

How to jump to a tab using VBA code

I'm using VBA code to enter a SiteID on the Purchase Order Maintenance screen while I'm in the Line Items tab. Unfortunately, it jumps to the shipping information tab when I do this. What is the vba code to refocus the Line Items tab?
I guess no one monitors questions for Dynamics SL. I figured it out myself:
I Used the ApplSetFocus command to set the focus to a control on the tab I want to switch to.

Windows 7: Right click on file and run custom Excel VBA script

I wrote a macro in Excel VBA that can scrape files with an .f06 extension for certain data and then creates a spreadsheet that summarizes the data.
It is inconvenient to have to find the Excel workbook, open it, run the macro, & select the .f06 file to generate this summary.
I prefer to right-click on the .f06 file directly and have an option called 'scrape' that I could select and then it would run the code automatically.
1) Is this possible?
2) Can I use the existing macro-enabled Excel spreadsheet as the referenced code? Or do I need to re-write it in another language?
I am using Windows 7 Enterprise SP1 if relevant.
Thank you.
This is possible, but if you're on a company computer, I doubt that you'll be able to do some of the required steps.
1) write a VBScript for your macro according to the following guide:
http://wellsr.com/vba/2015/excel/run-macro-without-opening-excel-using-vbscript/
2) Launch the VBS you wrote in Step 1 from the right click menu, according to the following guide:
http://www.visualbasicscript.com/Launch-vbs-from-the-rightclick-menu-advanced-m32062.aspx
Best of luck!

Dialog Box Using VB Script

Hello I have some knowledge about VB Script, but i need some help so that it will help me to move further and study in VB Script.
I want to make dialog box which will contain :
Two radio button
one Text field to enter some value
OK and CANCEL button
so, could you please help me out?
VBScript doesn't support custom dialogs. You can either use the Internet Explorer COM object to emulate a dialog, or create an HTA. Either way you're building a web page with a form.

Interacting with dialogs in VS2010 with the Macro Recorder (using Visual Studio Macro Recorder to enter keystrokes automatically)

In one of my other questions, I inquired about a shortcut to enable a particular feature in the VS2010 IDE. It looks like the only way to make it happen is through the Macro Recorder, which I have unfortunately never used (as it looks quite powerful!).
The straightforward way to make my macro would be to start the recorder with CTRL+SHIFT+R, then go to Debug -> Exceptions, check all of the boxes I want, click OK, and then stop the recorder. Unfortunately, all that I can see is that it opens the Exceptions window, and no more than that.
I figured that if the Macro Recorder doesn't record mouse events, then surely it must record keyboard events, but I was wrong about that, too. Upon editing my TemporaryMacro, I saw that the only thing it does is
DTE.ExecuteCommand("Debug.Exceptions")
What I really want to do is add a method that can enter keystrokes like DOWN, ALT+T, and ENTER.
I have googled like crazy, gone through MSDN, and checked here on SO. I am embarrassed to say that I have been unable to find any information about an object in DTE that allows me to send keystrokes! Hopefully, someone here will know how to do it!
This is the closest thing I've found to a document regarding keystroke automation: http://msdn.microsoft.com/en-us/library/8h31zbch.aspx
Edit: I figured it out how to send keystrokes, but how can you send them to popup dialogs???
Here's the code I tried:
Public Module RecordingModule
Sub TemporaryMacro()
DTE.ExecuteCommand("Debug.Exceptions")
System.Windows.Forms.SendKeys.SendWait("+{TAB}")
System.Windows.Forms.SendKeys.SendWait("{DOWN}")
System.Windows.Forms.SendKeys.SendWait("%T")
System.Windows.Forms.SendKeys.SendWait("{ENTER}")
End Sub
End Module
I couldn't get it to work, so I tried debugging, and that's when I realized what was happening -- SendWait doesn't get called until after the dialog is dismissed.
So does anyone know how to use the Macro Recorder to interact with popup dialogs via keyboard commands?
I don't think you can send keystrokes to the dialog box.
I would recommend that you take a look at AutoHotKey, from there you can define interactions with dialog boxes. It works outside of Visual Studio, so you will probably find many more uses for it.

Resources