Everyday I have to FTP a file from the mainframe to a txt file (and have the batch file for this ok) then I need to open excel and run a macro to convert the file to a DBF file for another system to use.
The problem is that we have updated to Office 2010 and you can't save as DBF anymore! So I've installed Excel 97 as well and can manually open this, then run the macro to convert the txt file into a dbf.
What I would like is to have my batch file, open the file in the OLD version of excel, then auto run the macro - is this possible?
I've got it so far so it WILL open the old version, but then I have to File Open myself - if I try to link the file, it just opens it in 2010.
Thanks if anyone has any suggestions
Rob
Batch file to open an xls file in an older version of Excel
Moderator: DosItHelp
-
- Posts: 1
- Joined: 29 May 2012 05:05
Re: Batch file to open an xls file in an older version of Ex
Use this command:
it should work i use it with notepad++ to open a certain files when i run one of my batch files
@echo off
cls
set "OldExcel=put the excel.exe path here"
set "FilePath=put the file location u want to open here"
start "" "%OldExcel%" "%FilePath%"
it should work i use it with notepad++ to open a certain files when i run one of my batch files
Re: Batch file to open an xls file in an older version of Ex
Right click the excel file and then in the "Open With" menu, navigate to the excel 97 executable. Select always use this program and it will then open Excel 97, hopefully.