Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 Karim_Khan
		
			Karim_Khan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Team,
I have tried every attempt to store the value with leading zeros in qlik view but all got wasted same is working fine in front end of qlik view.But while am trying to store it in .excel or .csv format it getting removed.If I will open the same with notepad its taking leading zero can somebody is it possible or shall i drop my hope and ?
PFB attempts have tried
1. Text((Repeat('0',5-len(EMP_NO))))AS EMP_NO,
2. if(LEN(EMP_NO)>3,TEXT((Repeat('0',5-len(EMP_NO))&EMP_NO))) AS NEW_NO,
3. replace(ltrim(replace(EMP_NO, '0', ' ')), ' ', 0) as NewMaterial,
4 . IF (LEN(TRIM(EMP_NO))= 5 , '0' & EMP_NO, EMP_NO) AS LEN_NBR,
Regards,
KK
 
					
				
		
 marcus_sommer
		
			marcus_sommer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Extending the example from Felip I meant the following:
x:
Load chr(8203) & Data as Data Inline
[
Data
2
000001
];
store x into x.txt (txt);
- Marcus
 
					
				
		
 felipedl
		
			felipedl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Karim,
This code:
x:
Load * Inline
[
Data
2
000001
];
store x into x.txt (txt);
Gets me the attached file.
Can you share what you're doing and some sample data?
 
					
				
		
 marcus_sommer
		
			marcus_sommer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		It has nothing to do with Qlik else it's a special excel-feature demonstrating it's very high level intelligence to interpret the content - unfortunately it's not customizable or could be disabled (at least as I know).
As a workaround you could try it with a leading zero-white-space like chr(8203) or the excel own string-interpreter of chr(39) or something similar. By exporting objects from the gui to excel the chr(8203) worked well and I think the logic should work by storings, too.
- Marcus
 Karim_Khan
		
			Karim_Khan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Marcus Thanks for ur revert by exporting through GUI its working fine but how to interpret such things its challenge for me now
 
					
				
		
 marcus_sommer
		
			marcus_sommer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Extending the example from Felip I meant the following:
x:
Load chr(8203) & Data as Data Inline
[
Data
2
000001
];
store x into x.txt (txt);
- Marcus
 Karim_Khan
		
			Karim_Khan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks a lot man its done.....


 jenskrueger
		
			jenskrueger
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hallo Marcus,
und wieder einmal hattest du den entscheidenden Tipp: Chr(8203) vor die Nummer setzen bewirkt tatsächlich, dass in Excel die führende Null bestehen bleibt und kein Zeichen davor sichtbar / erkennbar / vorhanden ist. Genauso sollte es sein, super.
Danke dir.
Gruß,
Jens Krüger
