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.
A voir également:
- Importer un fichier txt sur access en vba
- Fichier bin - Guide
- Comment réduire la taille d'un fichier - Guide
- Comment ouvrir un fichier epub ? - Guide
- Fichier rar - Guide
- Fichier .dat - Guide
5 réponses
Salut,
ou alors :
DoCmd.TransferText acImportDelim, "nom_du_format_import", "table_a_remplir", "nom_du_fichier_texte"
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
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
merci quand même
touftouf3d
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question