Open Excel file using Bat file
Posted: 16 Mar 2011 23:05
Hi All
I have following bat file. I want to open some of the excel files. This task must go under Select a task title by giving echo 6) Sample Reports. when Select 6, then have to display list of Sample reports. Then user is able to give option to open for particular excel file. Path for each excel files are,
C:\Reports\Staff Names.xls
C:\Reports\Codes.xls
C:\Reports\responsible works.xls
C:\Reports\class.xls
It doesn't matter create individual bat files to open for excel file. but these bat file must be called within the following one.
echo off
Reports Menu
:home
cls
echo.
echo Select a task:
echo =============
echo.
echo 0) Report Definitions
echo 1) Run newr001.Bat
echo 2) Run newr002.Bat
echo 3) Run newr003.Bat
echo 4) Run newr004.Bat
echo 5) Exit
set /p web=Type option:
if "%web%"=="0" goto Report Definitions
if "%web%"=="1" Call newr001.Bat
if "%web%"=="2" Call newr002.Bat
if "%web%"=="3" Call newr003.Bat
if "%web%"=="4" Call newr004.Bat
if "%web%"=="5" exit
goto home
:Report Definitions
echo newr001 ............. Report of Staff Names
echo newr002 ............. Report of codes
echo newr003 ............. Report of responsible work
echo newr004 ............. Report of class
Pause
goto home
Thank You
I have following bat file. I want to open some of the excel files. This task must go under Select a task title by giving echo 6) Sample Reports. when Select 6, then have to display list of Sample reports. Then user is able to give option to open for particular excel file. Path for each excel files are,
C:\Reports\Staff Names.xls
C:\Reports\Codes.xls
C:\Reports\responsible works.xls
C:\Reports\class.xls
It doesn't matter create individual bat files to open for excel file. but these bat file must be called within the following one.
echo off
Reports Menu
:home
cls
echo.
echo Select a task:
echo =============
echo.
echo 0) Report Definitions
echo 1) Run newr001.Bat
echo 2) Run newr002.Bat
echo 3) Run newr003.Bat
echo 4) Run newr004.Bat
echo 5) Exit
set /p web=Type option:
if "%web%"=="0" goto Report Definitions
if "%web%"=="1" Call newr001.Bat
if "%web%"=="2" Call newr002.Bat
if "%web%"=="3" Call newr003.Bat
if "%web%"=="4" Call newr004.Bat
if "%web%"=="5" exit
goto home
:Report Definitions
echo newr001 ............. Report of Staff Names
echo newr002 ............. Report of codes
echo newr003 ............. Report of responsible work
echo newr004 ............. Report of class
Pause
goto home
Thank You