Open Excel in Two Windows (Microsoft Excel 2007 / Windows Vista)


There is a flaw with the below solution it causes the associated Excel files to loose their icons. I posted a follow-up article for opening Excel in Multiple Windows that provides the same solution while associating a new icon with the Excel Files.

When you open an Excel file in Windows Vista, it will only open 1 instance of Excel and force you to tile the windows in order to see both at the same time. I find this annoying especially when I want the Excel files to display on multiple monitors.

I looked around for some solutions and found the following:

I didn’t like using the start menu option as I like to use Windows Explorer to open my Excel files and I couldn’t get the DDE option to work. So, I took a minute and developed my own fairly simple solution.

1. Put the following line of text in a bat file and save it at as c:\Program Files\runExcel.bat

start "Excel" "c:\Program Files\Microsoft Office\Office12\EXCEL.EXE" /e %1

2. Modify the shortcut for the .xls extension

Right click the excel file and select “Open With…” and then in the window that opens click “Browse…”

Open With

Then select the bat file you created in the first step by browsing to c:\program files and selecting runExcel.bat. Make sure that “Always use the selected program to open this kind of file” is checked in the “Open With” dialog.

Now anytime you double click on an Excel file it will always open it in a new window – the way I think it should be.



Related Posts:

17 Responses to “Open Excel in Two Windows (Microsoft Excel 2007 / Windows Vista)”

  1. john
    john Says:

    how do you change the icon (i.e. not for all .bat files, but just for one called runExcel), so all the Excel files will have the Excel icon?

  2. Brett Batie
    Brett Says:

    Great Question! This was the next topic on my list to write an article about but you beat me to the punch. As far as I know there is no way to change the icon associated with Excel with this solution. Although, I did come up with a similar solution that will keep an icon associated with the Excel files. I updated the above post with a link to that article.

  3. Sam
    Sam Says:

    Hi Brett,
    Your follow-up article link about fixing the icon issue is not going anywhere. Would you please email your comments.

  4. Brett Batie
    Brett Says:

    Sam, Thanks for pointing out the invalid link. I have updated it.

  5. Allen Thomas
    Allen Thomas Says:

    I am running Office 2003 on Vista and have this issue. I did a work around by adding Excel to my “Send To” list. now I have the best of both worlds when I want to open two workbooks in one process I just double click, and when I want to open two workbooks in separate processes, I right click on the files and select send to, excel.

  6. Kathy
    Kathy Says:

    Thank you so much! This was the only one that actually worked for my Vista computer after searching on the internet for hours!!!

  7. Britt
    Britt Says:

    Or you can edit the registry on Vista and Windows 7 and it does the exact same thing as changing the file association through XP. This will not cause any Icon problems or anything.

    Delete the following lines in the registry:
    HKCR\Excel.Sheet.8\shell\Open\ddeexec
    HKCR\Excel.Sheet.12\shell\Open\ddeexec
    and change the below like shown:
    HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\Open\command
    C:\Program Files\Microsoft Office\Office12\EXCEL.EXE /e “%1″
    HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\command
    C:\Program Files\Microsoft Office\Office12\EXCEL.EXE /e “%1″

  8. Matt
    Matt Says:

    Thanks!! The bat file solution actually works with Vista, Well done!

  9. Shawn Edwards
    Shawn Edwards Says:

    Thanks worked! Notes – My Excel program was in Program Files (x86)
    if that is where yours is located you’ll want to edit the bat file. Also, run word pad as administrator so you can save there. Otherwise Vista gets it knickers in a twist and says “no” when you go to save the bat file.

  10. Wendy
    Wendy Says:

    Thank you, thank you, thank you. This simple and elegant solution is a lifesaver. I have used other options I found on the web (like playing with DDE settings and whatnot), and they worked, but every time a new Excel patch has come out it’s all back to the same window again. This last one, for some reason I couldn’t get the DDE fixes to make it work properly, and found your article while busy tearing my hair out. This should work going forward, regardless of patches. And if not, time to get OpenOffice!!

  11. Mike Preece
    Mike Preece Says:

    Hey Britt
    That Registry hack certainly makes my Vista PC open multiple excel windows it just doesn’t open any spreadsheets inside them. If you have any more great registry hacks please keep them to yourself. Fortunately I saved each reg hive before modifying and was able to set it back to normal which fixed the problem.

  12. Evan
    Evan Says:

    Hey Brett,

    Thanks for the information. I’ve been looking all over for a simple solution and this is the one that got the job done! I really appreciate it. Keep up the good work!

  13. Wz
    Wz Says:

    Thanks,

    This really helped. I had to change the directory a bit, but after that it worked fine!

  14. sam ott
    sam ott Says:

    Hi Brett,
    I am experiencing the same issue that Mike Preece stated on June 25th.
    I have Vista 64…I moved the bat file into the Program Files (x86) and adjusted the path.

    When I try to open an excel file from Windows Explorer… The app opens but there is no spreadsheet inside?
    Also noticed that it has taken away the xcel icon and shows a small white box.

  15. chuck_stones
    chuck_stones Says:

    Hi Brett!

    Thanks for your work on creating this useful little tool. The .bat file method definitely works around the issue of opening separate Excel documents in separate Excel instances, without having to use the ‘ignore other applications that use DDE’ [in Office 2007] (which causes the problem of opening a blank Excel instance when double clicking a file). However, there is one little quirk of this methodology which users should be aware of;

    By opening the files in separate instances of Excel, you inhibit the ability to copy formulas from one spreadsheet to another. For example if you enter the formula =sum(A1:C10) into a blank cell which gives a hypothetical total of 30 (value of 1 in each cell), when you copy this cell and paste it into a sheet in a separate instance, you will only copy the formula total, and not the formula itself (i.e. 30, and not =sum(A1:C10)).

    Not as annoying as not being able to open separate files in separate instances, but well worth mentioning if you plan to copy large numbers of complicated formulas from one spreadsheet to another.

    /chuck

    p.s. sorry for the verbose comment

  16. Iain
    Iain Says:

    To Mike Preece: You’ve obviously mucked something up, as it works like a dream. Any normal person would have renamed the entries rather than actually deleting straight off!

    Thanks muchly Britt! Please don’t keep hacks like that to yourself!

    To Sam ott: Check that the %1 is in quotes “%1″

  17. Gareth N
    Gareth N Says:

    Hi All,

    I had the original method of changing the settings via the application associations working on Windows XP but have recently switched to Windows 7 where this no longer seems to be an option.

    I have therefore been searching for a method to use on Windows 7 and have found a number of suggestions like this which have led me to the blank screen issue. Adding a few snippets from various site led me to creating the following .reg file which works perfectly:

    To use it, copy the contents below and paste it into notepad. Save the file as:

    Excel 2007 Dual Screen.reg (Make sure you select “All Files” from the file type drop down).
    Exit Notepad and run the file, accepting the warnings and your good to go.

    $$$$$$$$$$$$$$$$$ Start copying below this line $$$$$$$$$$$$$$$$$

    Windows Registry Editor Version 5.00

    ; —————– This file is intended to allow dual screen working in Excel 2007 ONLY —————–
    ; —- It will not work for earlier version of Excel and modifies the registry so please use carefully —-

    ; Changes the /e to “%1″ in the default and command keys to fix the issue that stops Excel opening .xls files

    [HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\command]
    @=”\”C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE\” \”%1\”"
    “command”=hex(7):76,00,55,00,70,00,41,00,56,00,36,00,21,00,21,00,21,00,21,00,\
    21,00,21,00,21,00,21,00,21,00,4d,00,4b,00,4b,00,53,00,6b,00,45,00,58,00,43,\
    00,45,00,4c,00,46,00,69,00,6c,00,65,00,73,00,3e,00,74,00,57,00,7b,00,7e,00,\
    24,00,34,00,51,00,5d,00,63,00,40,00,49,00,49,00,3d,00,6c,00,32,00,78,00,61,\
    00,54,00,4f,00,35,00,20,00,22,00,25,00,31,00,22,00,00,00,00,00

    ; Deletes the ddeexec key and sub keys to stop Excel using DDE to open the .xls files

    [-HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\ddeexec]
    [-HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\ddeexec\application]
    [-HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\ddeexec\topic]

    ; Changes the /e to “%1″ in the default and command keys to fix the issue that stops Excel opening .xlsx files

    [HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\Open\command]
    @=”\”C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE\” \”%1\”"
    “command”=hex(7):76,00,55,00,70,00,41,00,56,00,36,00,21,00,21,00,21,00,21,00,\
    21,00,21,00,21,00,21,00,21,00,4d,00,4b,00,4b,00,53,00,6b,00,45,00,58,00,43,\
    00,45,00,4c,00,46,00,69,00,6c,00,65,00,73,00,3e,00,74,00,57,00,7b,00,7e,00,\
    24,00,34,00,51,00,5d,00,63,00,40,00,49,00,49,00,3d,00,6c,00,32,00,78,00,61,\
    00,54,00,4f,00,35,00,20,00,22,00,25,00,31,00,22,00,00,00,00,00

    ; Deletes the ddeexec key and sub keys to stop Excel using DDE to open the .xlsx files

    [-HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\Open\ddeexec]
    [-HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\Open\ddeexec\application]
    [-HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\Open\ddeexec\topic]

    $$$$$$$$$$$$$$$$$ Stop copying above this line $$$$$$$$$$$$$$$$$

    If you want to restore to the original, copy the contents below and paste it into notepad. Save the file as:

    Excel 2007 Restore Settings.reg (Make sure you select “All Files” from the file type drop down).
    Exit Notepad and run the file, accepting the warnings and your good to go.

    $$$$$$$$$$$$$$$$$ Start copying below this line $$$$$$$$$$$$$$$$$

    Windows Registry Editor Version 5.00

    ; ———— This file is intended to restore the defaul opening settings in Excel 2007 ONLY ————
    ; —- It will not work for earlier version of Excel and modifies the registry so please use carefully —-

    ; Restores all the settings for .xls files

    [HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open]
    @=”&Open”

    [HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\command]
    @=”\”C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE\” /e”
    “command”=hex(7):76,00,55,00,70,00,41,00,56,00,36,00,21,00,21,00,21,00,21,00,\
    21,00,21,00,21,00,21,00,21,00,4d,00,4b,00,4b,00,53,00,6b,00,45,00,58,00,43,\
    00,45,00,4c,00,46,00,69,00,6c,00,65,00,73,00,3e,00,74,00,57,00,7b,00,7e,00,\
    24,00,34,00,51,00,5d,00,63,00,40,00,49,00,49,00,3d,00,6c,00,32,00,78,00,61,\
    00,54,00,4f,00,35,00,20,00,2f,00,65,00,00,00,00,00

    [HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\ddeexec]
    @=”[open(\"%1\")]”

    [HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\ddeexec\application]
    @=”Excel”

    [HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\ddeexec\topic]
    @=”system”

    ; Restores all the settings for .xlsx files

    [HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\Open]
    @=”&Open”

    [HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\Open\command]
    @=”\”C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE\” /e”
    “command”=hex(7):76,00,55,00,70,00,41,00,56,00,36,00,21,00,21,00,21,00,21,00,\
    21,00,21,00,21,00,21,00,21,00,4d,00,4b,00,4b,00,53,00,6b,00,45,00,58,00,43,\
    00,45,00,4c,00,46,00,69,00,6c,00,65,00,73,00,3e,00,74,00,57,00,7b,00,7e,00,\
    24,00,34,00,51,00,5d,00,63,00,40,00,49,00,49,00,3d,00,6c,00,32,00,78,00,61,\
    00,54,00,4f,00,35,00,20,00,2f,00,65,00,00,00,00,00

    [HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\Open\ddeexec]
    @=”[open(\"%1\")]”

    [HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\Open\ddeexec\application]
    @=”Excel”

    [HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\Open\ddeexec\topic]
    @=”system”

    $$$$$$$$$$$$$$$$$ Stop copying above this line $$$$$$$$$$$$$$$$$

Leave a Reply