• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1597
  • Last Modified:

Open a Excel file using batch

Hi, can anyone advise me with the code on ms-dos batch programming of opening/closing a Excel file?

Thanks
0
linlin_gwee
Asked:
linlin_gwee
1 Solution
 
bonzaiCommented:
hi

for opening try:

"C:\Program Files\Microsoft Office\Office10\EXCEL.EXE" /yourfile.xls
0
 
johnsc7Commented:
assuming you have .xls associated with Excel (use Explorer - View - Options - File Types) then you can simply use the file name i.e. this.xls
Works for me :)
0
 
pbarretteCommented:
Hi Linlin,

Building on John's answer, the following should work:
START MyFile.XLS

pb
0
 
dimdoms23Commented:
"c:\program files\microsoft office\office\excel.exe"  
c:\102.xls

(all on one line), will do the trick.

Make sure the path to the prog file is working - type it in explorer.  Put it in quotes.

closing can't be done.
0
 
linlin_gweeAuthor Commented:
Dear all,

Thanks for your help! I've got it.

Cheers,
Lin Lin
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now