Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi Team,
I have an excel file containing unusual header names like F1, F2, F3 etc.
I want to change it in the form SubjectName_Externals, SubjectName_Internals and SubjectName_Practicals.
but the problem that I am facing is
Subject name is either of 2 word or more as shown below
Subject1 = 'Embedded System';
Subject2 = 'Imformation Security Management';
Kindly help me with a solution to resolve this issue.
I have also attached qvw file.
Regards
Priyanka
 
					
				
		
 prieper
		
			prieper
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You need to put square brackets into the script, not the variables:
Directory;
LOAD [Student Name] as Student_Name,
[Paper-I] as [$(Subject1)_$(Ext)],
....
Peter
 
					
				
		
.png) JonnyPoole
		
			JonnyPoole
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		add square brackets in the variable values
change :
Let Subject1 = 'Embedded System';
Let Subject2 = 'Imformation Security Management';
Let Subject4 = 'Ethical hacking';
to:
Let Subject1 = '[Embedded System]';
Let Subject2 = '[Imformation Security Management]';
Let Subject4 = '[Ethical hacking]';
 
					
				
		
Hi Jonathan,
Thanks for you reply.
I tried to implement it and I got syntax error.
Regards,
Priyanka
 
					
				
		
 prieper
		
			prieper
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You need to put square brackets into the script, not the variables:
Directory;
LOAD [Student Name] as Student_Name,
[Paper-I] as [$(Subject1)_$(Ext)],
....
Peter
 
					
				
		
Thanks Peter 
 Gabriel
		
			Gabriel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Try this
Let Subject1 = chr(91) & 'Embedded System' & chr(93);
 Let Subject2 = chr(91) & 'Imformation Security Management' & chr(93);
 Let Subject3 = chr(91) & 'Virtualization' & chr(93);
 Let Subject4 =chr(91) & 'Ethical hacking' & chr(93); 
 
 
					
				
		
.png) JonnyPoole
		
			JonnyPoole
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi - yes sorry. because you are using 2 variables the square brackets need to come at the beginning and end of the full string. Something like this:
Let Ext = 'External]';
Let Int = 'Internals]';
Let Prac = 'Practical]';
Let Subject1 = '[Embedded System';
Let Subject2 = '[Imformation Security Management';
Let Subject3 = '[Virtualization';
Let Subject4 = '[Ethical hacking';
then this:
| [Paper-I] as | $(Subject1)_$(Ext), | 
will evaluate to
| [Paper-I] as | [Embedded System_External]; | 
Or you can try the valid alternative mentioned by PR too.
