VB6 - Export d'une table Access dans un fichier Excel

VB6 - Export d'une table Access dans un fichier Excel - VB/VBA/VBS - Programmation

Marsh Posté le 04-04-2005 à 15:47:17    


Bonjour
 
Avec VB6, j'ai un problème dans l'utilisation de la fonction qui permet d'exporter une table Access vers un fichier Excel. La commande est la suivante :
 
DoCmd.TransferSpreadsheet [typetransfert][, typefeuille], nomtable, nomfichier[, contientnomschamps][, étendue]
 
Mon problème se situe au niveau du nom de la table. Que dois-je mettre ?
J'ai essayé de passer par un querydef, un tabledef, ça marche pas.
 
La fonction demande le nom de la table, mais comment passer le chemin et le nom de la abse de données ?????
 
 
 

Reply

Marsh Posté le 04-04-2005 à 15:47:17   

Reply

Marsh Posté le 02-06-2005 à 20:03:29    

Dim x1obj As Object, xx1obj
On Error Resume Next
Set x1obj = GetObject("Access.Application" )
x1obj.Application.Quit
Set xx1obj = GetObject("C:\Documents and Settings\paul\Bureau\Comptoir.mdb" )
xx1obj.DoCmd.TransferSpreadsheet acExport, 5, "Clients", "C:\Documents and Settings\paul\Bureau\Clients".xls", True
Set x1obj = Nothing: xx1obj = Nothing
 
http://multibases.site.voila.fr

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed