p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

access thread: import a sheet of a xls


Message #1 by "carlier jacques" <jacques.carlier@c...> on Wed, 12 Jun 2002 09:50:22
HI  ALL,

Is it possible to import a sheet from a xls ? 

Exemple :

worksheet:  dec42105.xls
sheet    :  prorata 
 
===> 
DoCmd.TransferSpreadsheet acImport,8,"dec42105","dec42105.xls",True,prorata


or  maybe another way  ??

 
THANKS

J. CARLIER
Brussels
Belgium
Message #2 by "Leo Scott" <leoscott@c...> on Wed, 12 Jun 2002 08:35:45 -0700
Look up the DoCmd.TransferSpreadsheet in the help.  You have to use the
Range:= argument like this to specify the range

   DoCmd.TransferSpreadsheet transfertype:=acImport, _
         TableName:="Detail", _
         FileName:=FilePath & FileName, _
         hasfieldnames:=False, _
         Range:="'Summary'$A1:N220"



|-----Original Message-----
|From: carlier jacques [mailto:jacques.carlier@c...]
|Sent: Wednesday, June 12, 2002 9:50 AM
|To: Access
|Subject: [access] import a sheet of a xls
|
|
|HI  ALL,
|
|Is it possible to import a sheet from a xls ?
|
|Exemple :
|
|worksheet:  dec42105.xls
|sheet    :  prorata
|
|===>
|DoCmd.TransferSpreadsheet acImport,8,"dec42105","dec42105.xls",True,prorata
|
|
|or  maybe another way  ??
|
|
|THANKS
|
|J. CARLIER
|Brussels
|Belgium
|


  Return to Index