How to open an excel spreadsheet ?

  • Thread starter Thread starter Linda
  • Start date Start date
L

Linda

I would like to know how one can open an excel
spreadsheet from within access.

I'm outputting a query to excel and now I would like to
be able to open the file C:\temp\viewdetails.xls.

DoCmd.OutputTo
acOutputQuery, "qryviewdetails", "MicrosoftExcel
(*.xls)", "c:\temp\viewdetails.xls", False, ""

Thanks.
 
Try thi

Call Shell("c:\program files\microsoft office\office\excel.exe c:\MyPath\WorkbookName.xls", 1

Ji

----- Linda wrote: ----

I would like to know how one can open an excel
spreadsheet from within access

I'm outputting a query to excel and now I would like to
be able to open the file C:\temp\viewdetails.xls

DoCmd.OutputTo
acOutputQuery, "qryviewdetails", "MicrosoftExce
(*.xls)", "c:\temp\viewdetails.xls", False, "

Thanks.
 
A very simple method would be to use the command

Shell "excel c:\temp\viewdetails.xls"

That will run excel and open the file.
 
Back
Top