Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 tripatirao
		
			tripatirao
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Dear All,
I have one straight table and listbox(InvYear) in my attached application.
My requirement is ,I need to export the table data for each value of invyear field and store into different sheets of excel.
I have attached the excel format which I want as output.
Help me with macro code.
Regards
Tripati
 
					
				
		
 adamdavi3s
		
			adamdavi3s
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Use something like this, just use the normal export routine in the loop (search on here for the code if you don't have it)
Sub LoopItems
set val=ActiveDocument.Fields("InvYear").GetPossibleValues
for i=0 to val.Count-1
*YOUR EXPORT CODE HERE*
next
End Sub
In fact I can see the base of this code is in what you have attached so should be simple for you to alter it?
 
					
				
		
 tripatirao
		
			tripatirao
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Dear Adam,
Thanks for your reply .
I dont know any thing about VB SCRIPT.
i can able to send table data into multiple excel like 2011.xls,2012,xls
But i am not able alter the code in the attached qlikview file which is able to send table data into multiple sheet of single excel.
Help me to send data into multiple sheets of single excel
Regards
Tripati
