How to generate a csv file containing alphanumeric codes without losing left zeros


The purpose was my product codes were modified by Excel :
for example 00123456789 was modified in 123456789

I finally found a way to do that :-)

I'm using this function:

###############################################################
#Garder les zéros à gauche: syntaxe ="0001234" pour Excel
Funprog TOCHAR(LTEXTE) 
Value Char LTEXTE

Local Char WSTR(80)

WSTR='="'+LTEXTE+'"'

End WSTR

##############################################

Export model:

The final exported file looks like this:

="4560295040595";="0713525254";="CCTRB4025252";C-CTRB 4025-25-2;0;15;C-CTRB END-MIXX
="4560295040601";="0713525256";="CCTRB4025253";C-CTRB 4025-25-3;0;36;C-CTRB END-MIXX
="4560295040618";="0713525258";="CCTRB4025254";C-CTRB 4025-25-4;0;9;C-CTRB END-MIXX

If someone has a better solution, I would be interested ...

Many thanks !