RDV+DIAL chat illimit� dans ta r�g!
no save
Assistance
Achat
News

Forum | programmation
Ouverture fichier .txt en .XLS avec EXCEL
Napalawow, le jeu. 01 mai 2008 à 17:20:38
Bonjour,
Salut tout le monde!

J'aimerai ouvrir un fichier txt en xls.
Le fichier en .txt se présente sous cette forme : "nomSite"_Data10min_"date"
Le fichier .txt => nomSite_Data10min_date.txt => à 2 variables avec comme 1° variable "nomSite" est comme 2° variable "Date"
Je dois pouvoir rentrer le nom du site
et la date est celle du systéme sous la forme aaaa-mm-jj

J'ai écrit qqlignes de la macro pour ouvrir le fichier .txt
Je ne sais pas comment l'ouvrir en .xls




Sub ouvrirfichier()
Dim reponse As String
Dim Repertoire As String


reponse = InputBox("Donner le nom du site", "Nom du site")
If NomSite = "" Then End
MaDate = Format(Date, "yyyy-mm-dd")

Repertoire = "C:\Documents and Settings\HOURCADE\Bureau\JDH"

Workbooks.OpenText Filename:=Repertoire & "\" & reponse & "_Data10min_" & MaDate & ".txt"

End Sub






J'ai compiler la macro, elle me demande bien le nom du site mais elle n'ouvre pas le fichier :/








MErci par avance des futurs aides

JDConfiguration: Windows XP
Internet Explorer 7.0


123Thomas123
mai 08
Suivant
REPONSES
123Thomas123
mai 08
amigo
mai 08
123Thomas123
mai 08
amigo
mai 08
123Thomas123
mai 08
Napalawow
mai 08
amigo
mai 08
amigo
mai 08
Napalawow
mai 08
talla firenze
déc. 08
Version Web
Réalisé par RedShift
no save