florian37
Messages postés56Date d'inscriptiondimanche 13 janvier 2002StatutMembreDernière intervention 8 décembre 2008
-
6 sept. 2002 à 00:53
hamid79380J
Messages postés4Date d'inscriptionvendredi 20 mai 2011StatutMembreDernière intervention23 septembre 2012
-
23 sept. 2012 à 15:35
Bonjour à tous amis dévelopeur,
voici mon prbleme,
j'ai une listview qui contiens plusieurs lignes (ca peu varier), je la transfert vers ecxel mais elle me copie que la premiere ligne de ma listview,
pouvez vous getter un oeil sur mon code et me dire comment faire pour copier les autres lignes de la listview dans les cases suivante d'excel?
Voici le code:
Private Sub ExportExcel_Click()
Dim i As Integer
Dim j As Integer
'Chemin du fichier a modifier à chaque installation
repertoire = "C:\fichier.xls"
'Ouverture de l'application
Set appexcel = New Excel.Application
'Gestion du fichier et ouverture statique
appexcel.Workbooks.Open repertoire
'Visualisation en fond d'ecran la page excel
appexcel.Visible = True
'On remplit l'entete de la page excel
appexcel.Worksheets(1).Cells(1, 1).Value = "Date et Heure:"
appexcel.Worksheets(1).Cells(1, 2).Value = "Blanc:"
appexcel.Worksheets(1).Cells(1, 3).Value = "Ciment Blanc:"
appexcel.Worksheets(1).Cells(1, 4).Value = "Ciment Gris:"
appexcel.Worksheets(1).Cells(1, 5).Value = "Concasse:"
appexcel.Worksheets(1).Cells(1, 6).Value = "Filler:"
appexcel.Worksheets(1).Cells(1, 7).Value = "Mi Casse:"
appexcel.Worksheets(1).Cells(1, 8).Value = "Roule:"
appexcel.Worksheets(1).Cells(1, 9).Value = "Silice:"
appexcel.Worksheets(1).Cells(1, 10).Value = "Silice humide:"
appexcel.Worksheets(1).Cells(1, 11).Value = "Vasilogrit:"
appexcel.Worksheets(1).Cells(1, i).Font.Bold = True
appexcel.Worksheets(1).Cells(1, i).Font.Size = 8
appexcel.Worksheets(1).Cells(1, i).HorizontalAlignment = xlCenter
appexcel.Worksheets(1).Cells(1, i).VerticalAlignment = xlCenter
Next i
For j = 1 To 11
appexcel.Worksheets(1).Cells(2, j).HorizontalAlignment = xlCenter
Next j
End Sub
Merci de me dire comment fair avec un loop par exemple ou autre car je vois pas trop la,
je suis débutant.
' important
'###########################
For j = 1 To Listc1.ListItems.Count
For K = 1 To 16
Set Cellule = ActiveSheet.Range(Cells(j + 5, K), Cells(j + 4, K))
Cellule.Borders(xlEdgeLeft).LineStyle = xlContinuous
Cellule.Borders(xlEdgeRight).LineStyle = xlContinuous
Cellule.Borders(xlEdgeBottom).LineStyle = xlContinuous
Set Cellule = Nothing
Next K
hamid79380J
Messages postés4Date d'inscriptionvendredi 20 mai 2011StatutMembreDernière intervention23 septembre 2012 23 sept. 2012 à 15:35
moi j ai trouve un pb est que la valeur de la collone de la date ne transfert pas comme il est.
la valeur du mois prendre la place de jours est et mm pour les jours
veuillez svp de m aide
MERCI