insert multiple lines in one cellule excel with code C/AL ??

amh1984amh1984 Member Posts: 9
Version 2 of my msg ^^"

Hi ,
I want insert multiple lines in one cellule of excel (carriage return Alt+Enter).
So, i use the hex code : '&#10 '
This is my code :
IF rArchSerJobLine.FIND('-') THEN BEGIN
REPEAT BEGIN
vGInst:=vGInst + rArchSerJobLine.Instruction + ' ' + rArchSerJobLine."Instruction 2" + ' ' + '&#10 ' + ' ' ;
until rArchSerJobLine.next = 0;

The carriage return work perfect but not for the the first line !!!!!!!!

my result in cellule excel :
FRAIS DE TRANSPORT VN HORS FILIALES &#10 LIVRAISION A CIE YOP 5000F LIVRAISION CHER THELEN
2000F LIV GARAGE CENTRAL CIE YOP 5000F
LIV CHEZ CMT 2000F LIV CHEZ THELEN KOUMASSI
2000F LIV CARE LINE 4000F LIV YOP 5000F


the result that i want :
FRAIS DE TRANSPORT VN HORS FILIALES
LIVRAISION A CIE YOP 5000F LIVRAISION CHER THELEN
2000F LIV GARAGE CENTRAL CIE YOP 5000F
LIV CHEZ CMT 2000F LIV CHEZ THELEN KOUMASSI
2000F LIV CARE LINE 4000F LIV YOP 5000F


Someone have an idea ????
plz ....

Comments

  • GRIZZLYGRIZZLY Member Posts: 127
    I usually create 2 variables of Char type: CR and LF.
    Define the value of variables before starting the code:
    CR := 13;
    LF := 10;
    
    vGInst:=vGInst + rArchSerJobLine.Instruction + ' ' + rArchSerJobLine."Instruction 2" + ' ' + CR + LF + ' ' ;
    
    Sincerely yours, GRIZZLY
    Follow my blog at http://x-dynamics.blogspot.com
Sign In or Register to comment.