Importer un fichier txt sur access en vba
Résolu
touftouf3d
-
touftouf3d -
touftouf3d -
Bonjour,
J'aimerais savoir comment on importe un contenue texte (.txt) dans une tabble sur access en vba.
A tous, merci d'avance.
J'aimerais savoir comment on importe un contenue texte (.txt) dans une tabble sur access en vba.
A tous, merci d'avance.
Configuration: Windows XP Internet Explorer 6.0
5 réponses
-
Salut,
ou alors :
DoCmd.TransferText acImportDelim, "nom_du_format_import", "table_a_remplir", "nom_du_fichier_texte"
-
Open monFichierTexteFor Input Access Read Lock Read As #1
Set rs = currentdb.OpenRecordset("SELECT T.* FROM [MaTable] AS T;")
rs.movefirst
DoEvents
Do While Not (EOF(1))
Line Input #1, textline
rs.addnew
rs!(monchamps) = textline
rs.update
Loop
set rs = nothing
close #1 -
-
dsl mais sa ne fonctionne pas mais je reste a l'écoute si quelqu' un a une autre solution
merci quand même
touftouf3d -
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question -
c'est bon j'ai resolu mon pb donc voila si sa peut aifer quelqu'un:
DoCmd.TransferText acLinkDelim, "Spécification d'importation", "table", "nom du fichier a importer et son chemin"
Merci a tous
Touftouf3d