Programmation VB
Fermé
OBOOM
-
20 mai 2010 à 13:58
charles1453 Messages postés 172 Date d'inscription mardi 7 octobre 2008 Statut Membre Dernière intervention 8 février 2013 - 4 juin 2010 à 23:33
charles1453 Messages postés 172 Date d'inscription mardi 7 octobre 2008 Statut Membre Dernière intervention 8 février 2013 - 4 juin 2010 à 23:33
A voir également:
- Programmation VB
- Vb - Télécharger - Langages
- Vb cable - Télécharger - Audio & Musique
- Application de programmation - Guide
- Programmation - Guide
- Programmation logo tortue télécharger - Télécharger - Études & Formations
1 réponse
charles1453
Messages postés
172
Date d'inscription
mardi 7 octobre 2008
Statut
Membre
Dernière intervention
8 février 2013
17
4 juin 2010 à 23:33
4 juin 2010 à 23:33
Utilise excel c'est simple;
Imports Microsoft.Office.Interop.Excel
Imports Microsoft.Office.Interop
--- Variables ---
Public xlApp As Excel.Application
Public xlBook As Workbook
Public xlSheet As Worksheet
--- Ouvrir le fichier ---
xlApp = New Excel.Application
xlBook = xlApp.Workbooks.Open("C:\Chemin\fichier.xlsx")
xlSheet = xlBook.Worksheets("feuil1")
xlSheet.Visible = True
xlApp.Visible = False
xlApp.DisplayAlerts = False
--- Ecrire ---
Variable1 = xlSheet.Range("A1").Value
--- Lire ---
xlSheet.Range("A1").Value = Variable1
--- Save ---
xlBook.Save()
Imports Microsoft.Office.Interop.Excel
Imports Microsoft.Office.Interop
--- Variables ---
Public xlApp As Excel.Application
Public xlBook As Workbook
Public xlSheet As Worksheet
--- Ouvrir le fichier ---
xlApp = New Excel.Application
xlBook = xlApp.Workbooks.Open("C:\Chemin\fichier.xlsx")
xlSheet = xlBook.Worksheets("feuil1")
xlSheet.Visible = True
xlApp.Visible = False
xlApp.DisplayAlerts = False
--- Ecrire ---
Variable1 = xlSheet.Range("A1").Value
--- Lire ---
xlSheet.Range("A1").Value = Variable1
--- Save ---
xlBook.Save()