Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 ashok1203
		
			ashok1203
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi All,
I need a small help. I have created a report in the QV application. i want to export that report data automatically everyday into a QVD. I have written one macro for this after post reload action. I am getting the QVD but with a limited set of rows i.e. 65536. I need all the data into a QVD. can any one help me on this.
 ashok1203
		
			ashok1203
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi I am not using any loop in my macro code.Please look at below macro code am using :
sub Export
set obj1 = ActiveDocument.GetSheetObject("CH36")
obj1.ExportBiff "D:\Exportv1.csv"
end sub
Please help me in this regard. Is their any alternative way to do this?
thanks in Advance...!
 ashok1203
		
			ashok1203
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Guys Any Idea on this. Please share your views on this ASAP. I need a quick help on this.
 
					
				
		
65536 sounds like a limitation of a numeric variable?
do you use a loop with a counter? Counter runs from 0 to ffff (or 65536)?
if not, post ypur macro
 ashok1203
		
			ashok1203
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi I am not using any loop in my macro code.Please look at below macro code am using :
sub Export
set obj1 = ActiveDocument.GetSheetObject("CH36")
obj1.ExportBiff "D:\Exportv1.csv"
end sub
Please help me in this regard. Is their any alternative way to do this?
thanks in Advance...!
 
					
				
		
I am very sure that the Problem is the cvs file.
while Excel has no more the Limit to 65536 lines
but csv still has it..
also csv is loosing formating options
try to Export to excel
obj1.ExportBiff "D:\Exportv1.xls"
 ashok1203
		
			ashok1203
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I tried to export the same in .xls, .xlsx, .qvd also. But all are giving the same result.
 
					
				
		
 avinashelite
		
			avinashelite
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Its the limitation with the Excel , we could export only the first 65536 rows of data in the export . In order to get the complete rows you need to write the macro to do that
Try like this:
1.Count the number of rows
2.If its more than get 65536 rows than you need divide the data set in to first 65536 and second 65536 like this then loop through and export the complete same.
OR
Build the complete logic in the script and then directly create the QVD so that you won't face this issues
hope this helps you
 ashok1203
		
			ashok1203
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		-Thanks Avinash for your help. Do you any macro code to divide the data automatically from the object and export it to N no. of files.
- In script we are getting the data not in one table. It's around 10 tables. So, I hope cann't create the logic to create a QVD in backend it self.
 Digvijay_Singh
		
			Digvijay_Singh
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Check this thread -
Re: Macro to create an Excel file - Problem if more than 65536 rows
 
					
				
		
 avinashelite
		
			avinashelite
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I don't have any , you could try with the digvijay suggested thread , hope that might give you the idea
