Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 pablolabbe
		
			pablolabbe
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I'm using the following VBS code to export a sheet as an image, but Qlikview opens as a normal window, not maximized. Then, the resulting image is truncated (as attached).
How open Qlikview as full windows ?
set Qv = CreateObject("QlikTech.QlikView")
Set docObj = Qv.OpenDocEx ("C:\program files\QlikView\Exemplos\Documents\films.qvw",0,false) ' Open the document
wscript.echo docobj.name & " " &docobj.noofsheets
Set sheetObj = docObj.ActivateSheetById("SH10") ' Get the Sheet More Dimensions
Qv.WaitForIdle ' Wait for Sheet to finish painting
ret = sheetObj.("c:\Films_MoreDimensions.jpg", true)<div></div>
 
					
				
		
hi Pablo
If you got the solution of this problem kindly provide me.
We are also facing same problem.
Regards
Ashish
 
					
				
		
Dear All
I waiting for your apply.
Regards
Ashish
 
					
				
		
Hi All
I need for your help.
Regards
Ashish
 
					
				
		
 biester
		
			biester
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		It won't work with VBScript I suppose. You'll have to do it with e.g. C#. An example code you can find enclosed (just replace "C:\path_to_your.qvw" with an application of yours).
Rgds,
Joachim
 pablolabbe
		
			pablolabbe
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		the trick is to use sendkeys to maximize the window.
'Create an instance of QlikView
set Qv = CreateObject("QlikTech.QlikView")
set shell = createobject("wscript.shell")
 success = shell.appactivate("Qlikview x64 - [Start Page]")
 shell.sendkeys "(%) X"
Set docObj = Qv.OpenDocEx ("c:\qlikview\document.qvw",0,false) ' Open the document
Qv.WaitForIdle ' Wait for Sheet to finish painting
shell.sendkeys "%"
shell.sendkeys " "
shell.sendkeys "X"
'at this point put your code to export sheet image
Good Luck
 
					
				
		
Pablo thanks for publishing this information as it was very helpful.
Kal
 
					
				
		
 bradshields
		
			bradshields
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi All,
As suggested this works perfectly when manually running the .vbs or manually running a task that triggers the .vbs but when the tasks is scheduled to run say at 6am the images are still cropped. I guess the server it is running on doesn't have a screen open and perhaps that means the code to maximise the window to full screen doesn't work. Any ideas?
 
					
				
		
Pablo does this work for you all of the time as I am getting inconsistent results, mostly cropped images.
Thx,
Kal
 
					
				
		
In my research I have found several documented instances where the sendkeys functionality does not work correctly on a 64bit OS and the recommendation is to use Power Shell or AutoIT. Has anyone else used these products in exporting images from Qlikview?
Kal
