Exportation des données

cs_paras00 Messages postés 6 Date d'inscription mercredi 13 décembre 2000 Statut Membre Dernière intervention 19 mai 2010 - 21 juin 2009 à 20:37
xpert12 Messages postés 114 Date d'inscription lundi 5 février 2007 Statut Membre Dernière intervention 10 septembre 2010 - 21 juin 2009 à 21:32
S'il vous plait ,j'ai un probléme au niveau d'exportation des données d'n Msflexgridvers un fichier excel avec VB 6.
            Merci .

C urgent, Merci d'avance

2 réponses

xpert12 Messages postés 114 Date d'inscription lundi 5 février 2007 Statut Membre Dernière intervention 10 septembre 2010
21 juin 2009 à 21:26
Salut,

tu peux essayer ça :

Il faut la référence à EXCEL bien sûr dans ton projet.

' Remplir le classeur
For intRow = 1 To TheRows
For intCol = 1 To TheCols
With TheFlexgrid
wsXL.Cells(intRow, intCol).Value = _
.TextMatrix(intRow - 1, intCol - 1) & " "
End With
Next
Next

' Formatage
For intCol = 1 To TheCols
wsXL.Columns(intCol).AutoFit
wsXL.Range("a1", Right(wsXL.Columns(TheCols).AddressLocal, _
1) & TheRows).AutoFormat GridStyle
Next

@+
0
Rejoignez-nous