Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 manojkulkarni
		
			manojkulkarni
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Friends,
Is there a way to read only few columns or set of columns from given excel. I have excel having 50+ columns but need to read only first 25 columns. How can we achieve this ?
 Kushal_Chawda
		
			Kushal_Chawda
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can do this if you have 25 field names in another excel file with same name as in actual excel
 
					
				
		
 manojkulkarni
		
			manojkulkarni
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Yes , all excels will have 25 columns. In some of we are more excels which we don't want to read
 
					
				
		
 manojkulkarni
		
			manojkulkarni
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Column names are not fixed
Do you already have any For each / Loop script ??
 
					
				
		
 prieper
		
			prieper
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Load without header from Excel, e.g.
LOAD A,B,C,D,E..... FROM...
Then read only the first line, which may contain the headers,
and do a renaming of the fields
HTH Peter
 
					
				
		
 vinieme12
		
			vinieme12
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		What exactly is your requirement?
Load only First 25 columns?
or
Load only 25 columns ?
if Column names are not fixed then how do you identify which columns to load?
 
					
				
		
 manojkulkarni
		
			manojkulkarni
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Column names are days of the Month (in DD-mm-yyyy format). This differs for every month.
We are not getting exactly 30/31 days columns. Some time it comes with 50 or more columns which is not required for us.
 
					
				
		
 prieper
		
			prieper
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		but then it may make sense to load with CROSSTABLE in first instance,
then inspect the fieldcontents and drop all fields, not being a valid date....
 
					
				
		
 afsarshaikh
		
			afsarshaikh
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Place condition WHERE RecNo() >= 1 AND RecNo() < 26 at the end of your LOAD script (before the semicolon).
Hope this works!
