Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to run Excel through the DOS shell? -- I want to open up a
text file in Excel, run a Macro that rearranges and parses text, then save it with a date-dependent name. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
c:\Excel.exe <cr
-- Regards, Tom Ogilvy "Ramesh Narasimhan" wrote in message ... Is it possible to run Excel through the DOS shell? -- I want to open up a text file in Excel, run a Macro that rearranges and parses text, then save it with a date-dependent name. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom Ogilvy wrote...
c:\Excel.exe <cr This is likely to produce the error message 'Excel.exe' is not recognized as an internal or external command, operable program or batch file. since the typical Office install doesn't put the Office program directory in either the system or installing user's PATH. OTOH, C:\ start excel does work even when the Office program directory isn't in PATH - it seems that start looks in the Registry to locate registered GUI programs. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Guess I haven't started it from a command prompt lately. works OK in
windows 9x as I recall. C:\"C:\Program Files\Microsoft Office\OFFICE11\Excel.exe" did work in Windows XP. Obviously the correct path would need to be used. Thanks for the correction. -- Regards, Tom Ogilvy "Harlan Grove" wrote in message oups.com... Tom Ogilvy wrote... c:\Excel.exe <cr This is likely to produce the error message 'Excel.exe' is not recognized as an internal or external command, operable program or batch file. since the typical Office install doesn't put the Office program directory in either the system or installing user's PATH. OTOH, C:\ start excel does work even when the Office program directory isn't in PATH - it seems that start looks in the Registry to locate registered GUI programs. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ramesh Narasimhan wrote...
Is it possible to run Excel through the DOS shell? -- I want to open up a text file in Excel, run a Macro that rearranges and parses text, then save it with a date-dependent name. If you're really processing text, Excel is a poor tool to use. There are many scripting languages that would be much easier to maintain and run in console sessions. Windows even comes with two scripting languages, VBScript and VJScript, which you could use to do this. That said, you could create a workbook containing the code necessary to process your text files in that workbook's Workbook_Open event handler. Then run Excel using CMD.EXE's start command with command line arguments for the text file to process and this workbook. Something like start excel d:\test\sample.txt d:\test\process.xls Note: the argument order is important. Put the pathname for the text file first followed by the pathname for the workbook. That way the text file will be open when the workbook loads and runs its Workbook_Open event. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
running excel 2003 macros | Excel Discussion (Misc queries) | |||
Running Macros in Excel 2003 | Excel Worksheet Functions | |||
Running macros on ALL Excel tabs | Excel Worksheet Functions | |||
excel macros running slow with XP | Excel Programming | |||
Running Macros in Access from Excel | Excel Programming |