Bonjour,
ce que j'ai écrit comme code
ne me donne pas tout à fait le résultat escompté quand je le récupère dans un tableau (open office, mais il en serait certainement de même avec MS Excel)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 if TPlatformServices.Current.SupportsPlatformService(IFMXClipboardService,Clip) then begin sl := TStringList.Create; try sl.StrictDelimiter := true; sl.Delimiter := #9; for I := 0 to StringGrid1.RowCount-1 do begin clipText:=Format('%s'#9'%s'#9'%s'#9'%s', [StringGrid1.Cells[0,i], StringGrid1.Cells[1,i], StringGrid1.Cells[2,i], StringGrid1.Cells[3,i], StringGrid1.Cells[4,i]]); Sl.Add(ClipText+SLineBreak); end; Clip.SetClipboard(sl.DelimitedText); Datas.MessageService.MessageDialogSync('Tableau copié dans le presse-papier', TMsgDlgType.mtInformation, [TMsgDlgBtn.mbOk], TMsgDlgBtn.mbOk, 0); finally SL.Free; end;
voici un échantillon de la sortie (en rouge ce qui semble ne pas aller)
"1 BADRAS/1404-001340 MU2020447001340 0
" "2 BADRAS/1404-001345 MU2020447001345 1
" "3 BADRAS/1404-001350 MU2020447001350 1
" "4 BADRAS/1404-001355 MU2020447001355 1
" "5 BADRAS/1404-001360 MU2020447001360 1
" "6 BADRAS/1404-001365 MU2020447001365 1
" "7 BADRAS/1404-001370 MU2020447001370 2
" "8 BADRAS/1404-001375 MU2020447001375 2
Donc, je me..e quelque part, mais la question est où ?
Partager