12 messages in org.openoffice.fr.progRe: [prog] Fenêtre de séparateur d'enreg
FromSent OnAttachments
Bruno ABRATANSKIApr 11, 2008 1:07 am 
bruno abratanskiApr 11, 2008 2:32 am 
Bernard MarcellyApr 11, 2008 6:57 am 
Bruno ABRATANSKIApr 11, 2008 7:23 am 
Serge LE LOUARNEApr 11, 2008 11:29 pm 
Bruno ABRATANSKIApr 14, 2008 2:34 am 
Bruno ABRATANSKIApr 15, 2008 8:45 am 
Bernard MarcellyApr 15, 2008 11:31 am 
Francois GattoApr 15, 2008 11:53 pm 
Bruno ABRATANSKIApr 15, 2008 11:53 pm 
Laurent GodardApr 16, 2008 12:01 am 
bruno abratanskiApr 16, 2008 1:46 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [prog] Fenêtre de séparateur d'enregActions...
From:Francois Gatto (oo@volcar.org)
Date:Apr 15, 2008 11:53:05 pm
List:org.openoffice.fr.prog

Bonjour,

Peut-être pourrais-tu ne pas procéder à un copier/coller, mais lire directement ton csv et l'intégrer dans la feuille.

Voici une idée de traitement

sub load_csv call csv2sheet( thisComponent.Sheets( 0 ), "/home/francois/Documents/csvTAB.csv" ) end sub

sub csv2sheet( oSheet as object, csvfile as string ) dim fileNumber as integer dim ligne as long dim colonne as long dim aLine as variant dim decomposition as variant

fileNumber = Freefile() open csvfile for input as fileNumber ligne = 0

while not eof( #fileNumber ) line input #fileNumber, aLine

'chr( 9 ) ==> code ascii tabulation decomposition = split( aLine, chr( 9 ) ) for colonne = 0 to ubound( decomposition ) if isNumeric( decomposition( colonne ) ) then oSheet.getCellByPosition( colonne, ligne ).value = decomposition( colonne ) else oSheet.getCellByPosition( colonne, ligne ).string = decomposition( colonne ) end if next colonne ligne = ligne + 1 wend

close #fileNumber end sub

Bonne chance.

Bruno ABRATANSKI a écrit :

Je ne m'en sors pas avec xray et uno:paste car je ne peux pas l'integrer dans mon code. Quelqu'un pourrait me dire si un parametre permet d'éviter la fenetre de séparateur svp..

merci

*Bruno ABRATANSKI**