PC Review


Reply
Thread Tools Rate Thread

Go to specific worksheet using command line switches

 
 
Bill Titus
Guest
Posts: n/a
 
      17th Dec 2004
Using a complete command line at "Start | Run" - NOT from within Excel
itself.

What form of filename and switches will allow me to call a workbook and open
it to a specific worksheet and, if possible, a specific cell?

I've tried the following without success:

"C:\Program Files\Microsoft Office\Office\EXCEL.EXE"
"N:\Calendars\PlanningCalendar.xls#JAN05!A1"

JAN05 is one of 24 worksheets in the workbook.

Any help will be much appreciated.




 
Reply With Quote
 
 
 
 
Frank Kabel
Guest
Posts: n/a
 
      17th Dec 2004
Hi
see your other post

--
Regards
Frank Kabel
Frankfurt, Germany
"Bill Titus" <(E-Mail Removed)> schrieb im Newsbeitrag
news:7HCwd.5614$(E-Mail Removed)...
> Using a complete command line at "Start | Run" - NOT from within Excel
> itself.
>
> What form of filename and switches will allow me to call a workbook and
> open
> it to a specific worksheet and, if possible, a specific cell?
>
> I've tried the following without success:
>
> "C:\Program Files\Microsoft Office\Office\EXCEL.EXE"
> "N:\Calendars\PlanningCalendar.xls#JAN05!A1"
>
> JAN05 is one of 24 worksheets in the workbook.
>
> Any help will be much appreciated.
>
>
>
>



 
Reply With Quote
 
PJF
Guest
Posts: n/a
 
      20th Dec 2004
Assuming N:\Calendars\PlanningCalendar.xls#JAN05!A1 is the path and file
name of your worksheet, simply put that string in the "Run" field of the
Start Menu, click OK and it should automatically start Excel and pop up the
desired worksheet.

Regards,

PJF


"Bill Titus" <(E-Mail Removed)> wrote in message
news:7HCwd.5614$(E-Mail Removed)...
> Using a complete command line at "Start | Run" - NOT from within Excel
> itself.
>
> What form of filename and switches will allow me to call a workbook and

open
> it to a specific worksheet and, if possible, a specific cell?
>
> I've tried the following without success:
>
> "C:\Program Files\Microsoft Office\Office\EXCEL.EXE"
> "N:\Calendars\PlanningCalendar.xls#JAN05!A1"
>
> JAN05 is one of 24 worksheets in the workbook.
>
> Any help will be much appreciated.
>
>
>
>



 
Reply With Quote
 
PJF
Guest
Posts: n/a
 
      20th Dec 2004
BTW, this apparently will not work if you use the CMD command in the RUN
window and then try to execute the file using the path and file name in the
DOS window.

"PJF" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Assuming N:\Calendars\PlanningCalendar.xls#JAN05!A1 is the path and file
> name of your worksheet, simply put that string in the "Run" field of the
> Start Menu, click OK and it should automatically start Excel and pop up

the
> desired worksheet.
>
> Regards,
>
> PJF
>
>
> "Bill Titus" <(E-Mail Removed)> wrote in message
> news:7HCwd.5614$(E-Mail Removed)...
> > Using a complete command line at "Start | Run" - NOT from within Excel
> > itself.
> >
> > What form of filename and switches will allow me to call a workbook and

> open
> > it to a specific worksheet and, if possible, a specific cell?
> >
> > I've tried the following without success:
> >
> > "C:\Program Files\Microsoft Office\Office\EXCEL.EXE"
> > "N:\Calendars\PlanningCalendar.xls#JAN05!A1"
> >
> > JAN05 is one of 24 worksheets in the workbook.
> >
> > Any help will be much appreciated.
> >
> >
> >
> >

>
>



 
Reply With Quote
 
PJF
Guest
Posts: n/a
 
      21st Dec 2004
After some experimenting, I found that it is possible to open a specific
Excel worksheet directly from the DOS command line WITHIN a DOS window. I
used the following batch file:

*SpellNumber.bat
Echo Off
Cls
c:\test\spellnumber.xls
pause
exit

Where the executable is named SpellNumber.bat and "c:\test\spellnumber.xls"
is the path and file name. Be sure to put the Excel worksheet in a directory
with a name DOS can recognize. I originally had it in a directory named
"Excel Docs" and that resulted in an error. So, best to use a directory
with a single name. Of course, you can name the batch file anything you
want; ditto for your directory and file names providing they can be
recognised by DOS. Hope this helps. Note that I did this in Excel 2000
running Windows 2000 Pro. If you're running a different configuration, your
results may vary! <g>

PJF

"PJF" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> BTW, this apparently will not work if you use the CMD command in the RUN
> window and then try to execute the file using the path and file name in

the
> DOS window.
>
> "PJF" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Assuming N:\Calendars\PlanningCalendar.xls#JAN05!A1 is the path and file
> > name of your worksheet, simply put that string in the "Run" field of the
> > Start Menu, click OK and it should automatically start Excel and pop up

> the
> > desired worksheet.
> >
> > Regards,
> >
> > PJF
> >
> >
> > "Bill Titus" <(E-Mail Removed)> wrote in message
> > news:7HCwd.5614$(E-Mail Removed)...
> > > Using a complete command line at "Start | Run" - NOT from within Excel
> > > itself.
> > >
> > > What form of filename and switches will allow me to call a workbook

and
> > open
> > > it to a specific worksheet and, if possible, a specific cell?
> > >
> > > I've tried the following without success:
> > >
> > > "C:\Program Files\Microsoft Office\Office\EXCEL.EXE"
> > > "N:\Calendars\PlanningCalendar.xls#JAN05!A1"
> > >
> > > JAN05 is one of 24 worksheets in the workbook.
> > >
> > > Any help will be much appreciated.
> > >
> > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      21st Dec 2004
PJF

You're going through a lotta work to open an Excel WORKBOOK, but the OP wished
the WORKBOOK to open with a specific WORKSHEET and specific cell activated.

This step can be done only through VBA code.

Gord Dibben Excel MVP

On Mon, 20 Dec 2004 23:50:19 -0500, "PJF" <(E-Mail Removed)> wrote:

>After some experimenting, I found that it is possible to open a specific
>Excel worksheet directly from the DOS command line WITHIN a DOS window. I
>used the following batch file:
>
>*SpellNumber.bat
>Echo Off
>Cls
>c:\test\spellnumber.xls
>pause
>exit
>
>Where the executable is named SpellNumber.bat and "c:\test\spellnumber.xls"
>is the path and file name. Be sure to put the Excel worksheet in a directory
>with a name DOS can recognize. I originally had it in a directory named
>"Excel Docs" and that resulted in an error. So, best to use a directory
>with a single name. Of course, you can name the batch file anything you
>want; ditto for your directory and file names providing they can be
>recognised by DOS. Hope this helps. Note that I did this in Excel 2000
>running Windows 2000 Pro. If you're running a different configuration, your
>results may vary! <g>
>
>PJF
>
>"PJF" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>> BTW, this apparently will not work if you use the CMD command in the RUN
>> window and then try to execute the file using the path and file name in

>the
>> DOS window.
>>
>> "PJF" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > Assuming N:\Calendars\PlanningCalendar.xls#JAN05!A1 is the path and file
>> > name of your worksheet, simply put that string in the "Run" field of the
>> > Start Menu, click OK and it should automatically start Excel and pop up

>> the
>> > desired worksheet.
>> >
>> > Regards,
>> >
>> > PJF
>> >
>> >
>> > "Bill Titus" <(E-Mail Removed)> wrote in message
>> > news:7HCwd.5614$(E-Mail Removed)...
>> > > Using a complete command line at "Start | Run" - NOT from within Excel
>> > > itself.
>> > >
>> > > What form of filename and switches will allow me to call a workbook

>and
>> > open
>> > > it to a specific worksheet and, if possible, a specific cell?
>> > >
>> > > I've tried the following without success:
>> > >
>> > > "C:\Program Files\Microsoft Office\Office\EXCEL.EXE"
>> > > "N:\Calendars\PlanningCalendar.xls#JAN05!A1"
>> > >
>> > > JAN05 is one of 24 worksheets in the workbook.
>> > >
>> > > Any help will be much appreciated.
>> > >
>> > >
>> > >
>> > >
>> >
>> >

>>
>>

>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command-Line Switches =?Utf-8?B?bWNhbGRlcg==?= Spyware Discussion 2 28th Mar 2007 03:59 AM
Re: Command line to open a specific worksheet Chip Pearson Microsoft Excel Worksheet Functions 0 1st Dec 2006 01:05 AM
Command line switches Jason Spyware Discussion 1 12th May 2005 02:43 PM
command-line switches =?Utf-8?B?SmFtZXM=?= Microsoft Access Form Coding 1 16th Oct 2004 12:47 AM
command line switch to open a specific worksheet? Paul B Microsoft Excel Misc 1 4th Feb 2004 08:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:40 AM.