Opening Excel Files in New Processes – Excel Launcher Helper App

Monday, June 21st, 2010

Excel Launcher 1.1 (9/1/2010)

So after some comments in the forums about my installer having problems I have updated Excel Launcher to use a new installation package (NSIS) and also made it easier to set the location of your Excel installation. NSIS did not support associating Excel files with Excel launcher so you will need to manually associate them using the technique shown at the end of this blog post. Please uninstall any existing version of Excel Launcher before installing this one.  Download Excel Launcher 1.1

  • Abandoned MS Installation package and switched to NSIS to stop bug where every time you opened a file a searching screen appeared.
  • Running Excel Launcher standalone now prompts you to set your Excel installation location every time and not just the first time

I am a multi-monitor fanatic. If  I could afford it I would have three 24″ monitors sitting on my office desk. Of course all this real estate requires good window management and fortunately Microsoft has finally improved theirs with Windows 7. Dragging windows up against the borders of a monitor causes them to fill either half or the whole monitor. This is fantastic for having side-by-side windows for work. You can also use the Windows Key + the arrow keys to quickly move windows across your monitors. Bravo!

But of course one of my most used applications does not support opening files in new processes. Excel. Why?!?! Why oh why must files always open in an existing Excel instance? This happens in other apps like Internet Explorer, but I can rip off the tabs and make them into new windows. Only Excel seems to cage me into this single window paradigm. After some googling I found a lot of people in the same boat and some very unsatisfactory workarounds including:

  • Modifying the shortcuts for all of your Excel files so that they open in a new instance – I don’t always use the same files so this is out.
  • Disabling DDE – which is no longer possible on Windows 7 and Vista
  • Dragging your Excel window to be really big and then using the internal Excel Window management – not good for multimonitor
  • Always launching a new Excel instance and choosing file -> open -> browse (sigh)

Disappointed, I resolved to manually opening new instances of Excel. But during a restless night it occurred to me – Excel does not open as a new process, but an application launcher could open new instances of Excel. What a fun programming project! I would create my own executable that would be associated with Excel file types -> xls, xlsx, csv, etc. That program would launch Excel and tell it to open the file. Bingo bango boingo we are in business.

So I sat down and within thirty minutes I had working code. I then thought it would be fun to make an installer instead of a dumb exe since there seemed to be so many people looking for this solution. Why not make it easy for them? I wish I had made it easy on myself. Four hours and many google searches later I finally have my program done and created in an installer package. In case anyone is wondering why it took so long I had to account for the fact that I am installing to the Program Files directory. With that comes access restrictions. Then I had to figure out how to read/write/store stuff to the registry. That required error handling. Auto updating research, tray application research, blah, blah blah.

Okay, enough complaining, this is what you are looking for. Download and install Excel Launcher. When you run it the first time it will prompt you for the location of your Excel application. This should be in program files or program files(x86): \microsoft office\officeXX\Excel.exe. Next associate any files that you want to open in a new Excel instance to Excel Launcher. By default XLS, XLSX and CSV files will be associated with Excel Launcher. To associate other files

  1. Right mouse button on an the file -> Open With -> Choose Default Program -> Browse
  2. Navigate to Excel Launcher.exe which should be in your program files directory
  3. Check the box for “Always use the selected program to open this kind of file.”

That’s it. Now whenever you open an Excel file it will use Excel Launcher which will create a new Excel process for you each time and open the file. As of now there is no argument passing so if you use arguments they will be ignored. If there is enough interest I may implement this for people in my copious free time.

Some ideas for improvements:

  • Prompt user to associate common file types when installing
  • Instead of storing Excel path in registry store it in an xml file in program files directory. This will allow multiple program types to leverage this functionality.
  • Allow passing of arguments through to Excel
  • Support DDE? I never really researched this so don’t even know if this is possible.

Tags: , ,

120 Responses to “Opening Excel Files in New Processes – Excel Launcher Helper App”

  1. Ingallspw says:

    This program works great! Do you have any updates that will work with macros opening files automatically? Thanks again!

    • Tom Sherman says:

      I am not familiar with the functionality of macros opening files. Can you elaborate or provide me an example?

      • d3phoenix says:

        I second this — He’s talking about macro-enabled files for excel. Their extension is *.xlsm, and they include VBScript macros for various purposes. These crop up all the time at work for me.

        I have solved the problem myself by manually assigning *.xlsm in Windows 7′s “Set Associations” utility to be opened with Excel Launcher. For other users, it would be handy in the next version (if you are still maintaining / working on it, of course) if it included *.xlsm in the file extensions it grabs.

        Great utility, wish I had thought of it!

  2. Hi Thomas, thank you very much for this gadget. I´m multi-monitor user too and I use W7, Office 2007 with Groove application. So, the problem was to open from inside Groove, 2 instances of Excell. This solution was very nice an solve the situation. Thanks a lot.

  3. ANNA says:

    Would that file work with MSOffice 2010?

    thanks in advance

  4. Jonathan says:

    Great work !! Works well with Win7 & Office 2007.

  5. Austin says:

    Does this fix allow you to copy worksheets between windows? That is my biggest gripe with all the fixes for Office 2007 that I have seen. Ya, I can make them auto open in different windows, but I can’t copy a sheet between spreadsheets open in two different windows. Why did they make this sooo difficult??

    • Tom Sherman says:

      Unfortunately no. I am bound by the same limitations that Excel has. I suspect that MS does not allow cut and paste between Excel instances because the clipboard is at the operating system level and not at the application level. There must be a ton of behind the scenes logic MS uses to cut and paste between spreadsheets and the rudimentary clipboard cannot know of this. An implementation would probably require copying of the data as xml to the clipboard and then the decoding of that xml data as it is pasted. Possibly they could create a sandbox that each Excel process is aware of and can access via a customized cut/paste operation, but I suspect that this would be more complicated to implement. Submit it as an enhancement request and maybe office 2015 you will get what you are looking for.

  6. adam says:

    Hi Tom, I like the idea of the program however everytime I now open an excel file (with excel launcher set as default program) I get a ‘please wait while windows configures Excel Launcher’ window, like an installer. This is even after a reboot. Is this normal? I expect it is only meant to happen on the initial run, is there anyway to stop it?

    • Tom Sherman says:

      I am not entirely certain what is going wrong. Installers are not my strong point. From googling around it looks like the installer package is either corrupted or needs something which is not available. If you let it run long enough it should tell you what it needs. As a quick first go round I would uninstall Excel Launcher from Add/Remove programs and then download again and reinstall. Maybe the download file got corrupted. If that doesn’t work then I would try letting windows installer search for what it needs for a a good ten minutes and see if you get anything. Sorry you are having problems! Did the program ever work or fail from the start?

    • pat says:

      Adam, I’m having the same problem. I’m using windows 7 on a 32 bit OS. the install appeared to be successful so it seems strange it would be corrupted and still work. like Tom, I have little experience with installers, so maybe that is normal.

      Tom, is there a log file your install generates to see if something failed?

  7. Roger says:

    Hi Tom,

    This is a handy little app and just what I need … thanks for writing it and saving me the time :-) Not bad for an English major!! … but I do have a glitch I am sure you will be interested to hear about … and can hopefully fix for me?

    I am using Windows 7 Pro with Office/Excel 2010. The installer all seems to run fine (except for no prompt for the Excel exe location … see below) and .csv, .xls and .xlsx types show up as being associated with ExcelLauncher in the W7 Default Programs/Set Associations tool. However when I launch multiple .xls files they all still open in the same (single) Excel window :-( .

    As mentioned above, the installer does not ask for the Excel location (maybe you look this up in the registry?) … and I also notice the “Excel Launcher.exe.config” element is empty? Is this correct?

    On a whim, guessing the config file might be menat to hold the Excel.exe path, I edited this file and added the path. Next time I ran ExcelLauncher it prompted me for the Excel.exe location which I entered and it now works … without further prompts … but with the same glitch that adam reported above. Strangely enough, it doesn’t seem to matter what I put in the config file. Just the very act of touching it caused it to start working. Out of interest, where is the Excel path entered the first time stored?

    Cheers
    Roger

    • Tom Sherman says:

      The path to Excel is stored in the registry at this location – HKEY_CURRENT_USER\Software\Excel Launcher in a REG_SZ named Excel Path with a value something like C:\Program Files\Microsoft Office\Office14\EXCEL.EXE. The configuration file you mentioned is a byproduct of the MS installer and as far as I know does not have anything to do with the application. I think it may be a coincidence that modifying the configuration file somehow coincided with Excel Launcher working for you. Excel Launcher cannot do anything until you specify the path to Excel.exe. It has absolutely no smarts. So when files were still opening in the same instance of Excel they were not using Excel Launcher.

      As you pointed out, it would be great if you could browse to your Excel instance from the installer… but Microsoft only bundles an extremely primitive installer with Visual Studio. I had a friend turn me on to an open source installer utility called Nullsoft Scriptable Install System. If I have the time I may rewrite the installer using this tool instead.

      As far as Adam’s bug is concerned I cannot reproduce it and I can’t really say what is going wrong. Microsoft handles all the dependencies of my application and it is really a black box for me. I wish I could be of more help. Perhaps installing .NET 4.0 would help.

  8. Carrie says:

    Thank you, this works perfectly. Now to compare my spreadsheets side-by-side and be more efficient in my work.

  9. Alan Massey says:

    This seems like a good solution ( I haven’t tried it ), but with about 5 minutes googling I found another solution which works from within Excel and does not require any third party software. This is for Office 2007, but I think the same applies for other versions, although the option will probably be somewhere else in the menus.

    Open Excel.
    Click the “office button” ( big colourful thing in top left corner )
    Click “Excel Options” ( bottom right )
    Click “Advanced” in left hand pane.
    Scroll down right hand pane to “General” section
    Tick the checkbox next to “Ignore other applications that use Dynamic Data Exchange (DDE)”
    OK out of the menu

    Now when you double-click an excel file in windows explorer, it will open in a separate instance of excel – Obvious isn’t it ?

    • Tom Sherman says:

      Thanks for the tip Alan. Unfortunately this did not work for me. In fact, it made it so that I could not open Excel files by double clicking them at all! I always got the error message “There was a problem sending the command to the program.” From google I see that other people have also encountered this problem.

      • Alan Massey says:

        Odd, it worked for me and one of my colleagues ( both running Office 2007 on Windows 7 professional ) – but I guess that’s Microsoft for you !

  10. Jan Scharloo says:

    Thanks for the application. It really works great and my frustrations are going. You made someone happy in Holland.

    • Carolien van de Lagemaat says:

      Dear all, hate to tell you that the solution is probably simpler. Do not open a second xls(x) from explorer but start a new Excel instance first. And open the xls(x) to be worked on inside the instance you like the sheets to run in. Indeed copying between sheets is pain outside the instance the sheet is running. But both solution have this flaw.
      To Jan in dutch: oplossingen zijn soms dichterbij dan je denkt.

      • Tom Sherman says:

        Thank you for the tip Carolien. Unfortunately for some people (such as myself!) this does not always work. The first reason is for people that open/close Excel sheets all day from Windows Explorer. Having to manually open a new Excel instance and going through the file->open dialog is a lot of extra steps. The second reason is if your Excel documents are opened with a third party application. In this case you cannot control the file opening. Regardless I hope that your tip helps some people out there. Cheers!

  11. Thomas says:

    Thank you so much. This issue already drove me crazy on Win7.

  12. Jason says:

    You rock. This was annoying as all get out. Can’t believe MS didn’t have an easily selectable option to do this.

  13. Travis says:

    Yes. My reg keys for Excel 2007 no longer work for Excel 2010. Thanks for writing this program!!

  14. Carter says:

    I just installed this and it works very well thank you! But I have noticed that it does not work when I open a file using my Jump List in Windows 7. Does anyone know of a way to make it work along with Jump Lists?

    • Tom Sherman says:

      Sorry I am just getting to this, but I just tested and this should work for you. Instead of pinning Excel.exe to your taskbar, pin Excel Launcher instead. Then reassociate your jumplist items to Excel Launcher instead of Excel. Let us know if it works for you so that everyone can benefit!

  15. Ron says:

    I just wanted to say thanks. I can’t tell you how much the single window has driven me bonkers and until today, I have not been able to find a good solution. Thanks for sharing this!

  16. Roger says:

    Thanks for the 1.1 update Tom. The config dialog is now gone and my excel processes start up nice and fast. A very handy little app. Thanks very much.

  17. Dan says:

    Hi Tom,

    Thanks for this. It works for multiple windows and open from explore and recent docs for me.

    I am going to need to copy/paste formulas between workbooks and guess that I cannot do this between separate instances/windows.

    If that is true then to do it Imagine I will need to open new workbooks from file/open within one of my open instances/windows. Which means two things:

    Defeats the purpose of the first solution to multiple monitors.
    Means I no longer can DDE.

    Asssuming Excel simply cannot do the copy/paste. Is there a quick easy toggle for you launcher? Can there be? I amnot a programmer but maybe a one touch button that instantly changes the file associations would work?

    Thanks

    • Tom Sherman says:

      There is an okay way to toggle between using my launcher and not using my launcher. You can right mouse button an Excel file and choose “open with.” From this menu you can could choose excel.exe and then the file would open using Excel instead of my launcher. If you want a true toggle you can do the same thing except pick “Choose default program” from the dropdown list. Then select excel.exe and ensure that the “Always use the selected program to open this kind of file” checkbox is ticked. Now every time an Excel file is opened it will use the old method. To reverse you do the same thing but choose Excel Launcher as the default instead.

  18. Hans says:

    Thanks for an awesome utility Tom! I got to the point where I gave up on approaches involving Excel/Windows configuration and resigned myself to the reality that I was going to have to build this type of utility myself. Fortunately, I found this page instead. Saved me a lot of time. Thanks again!

  19. Mark says:

    Brilliant… works perfectly. Thanks for you efforts. Cheers

  20. Gruff says:

    Hi – I’m sorry to report your app failed to work on my Dell Adamo (win 7 / SSD).

    The process hung rather badly, maxed out processor, opening up and closing more instances of itself (some kind of accidental recursion?). I had to hard shut down windows which caused my SSD to fail and windows then had to consistency check it before booting.

    it’s fine again now thankfully, but I’ve uninstalled the app. I’m gutted because I’ve been looking for a solution to this problem for ages now.

    Hope you can fix it!

    Gruff

    • Tom Sherman says:

      Hmm, that sounds pretty bad. Sorry that happened. I am not sure how that could occur. When you say “opening up and closing more instances of itself” what exactly do you mean? Did it create multiple popup windows with the “please specify excel location” dialog box? Or did it keep trying to open more and more Excel files? One idea may be that your SSD is causing the problem. I know that they run insanely fast and it could be introducing some sort of timing issue. The other possibility is the Excel file itself. If it somehow tries to open additional Excel instances through a macro or something then it might get into a recursive loop as you suggested. If it is possible to send me the Excel file that failed I can ensure that it is not the culprit. That might help me narrow down if it is the SSD. I can then stick in some code that ensures that only one instance of my application is capable of being open at a time. On a side note I figured out on my own system how to get Excel files to open in new instances without using my own Excel Launcher application. If you are computer savvy I can send you the gory details to try out.

  21. Piloutor says:

    Great job dude

  22. Kamil says:

    Bravo, good job!!! greetings from Poland.
    Its work on win7 and office 2010.

  23. Logan says:

    Oh Noez! The latest security patch from MS busted my excel launcher and it no longer works? Any idea on how I can get it to work again?

    • Tom Sherman says:

      Sorry to hear about that Logan. Check whether Excel Launcher is still the default application for your Excel files. You can do this by right clicking an Excel file and choosing “Open With…” The default application will be highlighted. If it isn’t Excel Launcher then there’s your problem. Uninstalling/reinstalling Excel Launcher may sort this issue out for you or you can follow the instructions in my blog post to reassociate your excel files with my app. Please let everyone else know if this solves your problem!

  24. Mike says:

    Thomas – This great, You rock!!

    Mike

  25. Gary says:

    Thanks. This was working normally for me until 2 weeks ago when IT pushed out an improvement patch. Called the helpless desk and got nothing but helpless. They could duplicate on several machines in their area, some opened two instances some only opened multiples in one. Lots of head scratching. Thanks for the fix.

  26. Stephan says:

    You may have a look at this page (http://www.excel-addins.de/addins.htm), Add-ins # 38 and #41.

  27. Gary says:

    Tom

    One question. With the app installed things are great…except when trying to open an embedded spreadsheet. Just noticed this when trying to open an excel file embedded as an object in either an Excel worksheet or within a Word doc. Running Office 2007/Vista. If I uninstall the App clicking on the links works. Thoughts?

    • Tom Sherman says:

      Hi Gary, can you give me a better idea of what exactly isn’t working? When you click on a link does it not work at all? Does it open the Excel file, but not in a new window? If you can provide me with an example spreadsheet or some simple steps for creating one of my own I can probably take a look and see what mechanism is being used for opening the spreadsheet. Once a diagnosis is made I can determine whether a fix is within my control.

  28. Bob says:

    Awesome! I have been searching forever for something like this good job!
    I did notice that a link within an excel file to open another excel file makes the linked file open in the same instance…. :)
    But I can live with that!

    Thanks!

  29. Andy says:

    I have installed v1.1, and done the right-click/OpenWith/Default thing.

    Now if I click on a XLS in FileManager it opens in a new windows – great!

    But if I right-click on Excel pinned-on icon in the taskbar it continues to open WITHIN the first Excel application.

    Anything I can do to fix this? (Cheers!)

    • Andy says:

      You already answered my question! And yes it DOES WORK!! Win7x64 & Office 2010×64.

      Well done! Superb work!!

      Tom wrote:
      ————-
      Sorry I am just getting to this, but I just tested and this should work for you. Instead of pinning Excel.exe to your taskbar, pin Excel Launcher instead. Then reassociate your jumplist items to Excel Launcher instead of Excel. Let us know if it works for you so that everyone can benefit!

  30. Colleen S says:

    Thank you thank you thank you! I just ‘upgraded’ to 2010, and the fix I had for the older version didn’t work. It was horribly frustrating as a dual monitor user!

    This does, and I’m absolutely THRILLED!

    Great job!!!

  31. Ben S says:

    Awesome! Thanks for making Excel useful again!

  32. Heinrich says:

    You, Sir, are awesome.

  33. Reddler says:

    Works great with W7 and Office XP (yeah I know, old stuff, but new licences are quite expensive…) ;)

  34. Manuel says:

    Tom,
    Thank you very much for this application! Being a BI professional and using Excel 2007 and 2010 on a daily basis, with all the files I get from the business users. You can imaging the frustration with the way Excel opens now! I can honestly say this is close to the best thing since sliced bread! So easy to install and use.

    Congrats on creating a very useful utility and thank you for the hard work on it!

    Manuel

  35. brian says:

    I installed adn it worked however then i uninstalled it and now i cannot open up excel files that are already saved on my computer…please help

    • Tom Sherman says:

      Typically uninstalling my app should restore your filetype associations. Not sure why it didn’t in your case. If you read my blog post I tell you how to associate your file types to an application. I also mention this in the comments section I believe. If you are really lost then going to Add/Remove Programs and running a repair on Microsoft Office or Excel will probably restore your file type associations.

      • brian says:

        I keep getting a window that say “There was a problem sending the command to the program.” I see that was noted in a reply of your above. I have asked co-workers using the same computer to try and check the box and it works to open new windows. They however had not installed this software. Would there be any other changes caused by installing this that would not get undone when uninstalled? There is no repair function in my program list for office…

        • Tom Sherman says:

          Can you please be more descriptive with your questions? It is very difficult for me to troubleshoot what “I have asked co-workers using the same computer to try and check the box and it works to open new windows.” What checkbox? What does “same computer” mean? Same hardware, same office installation? If you can’t take the time to ask a well thought out question then I cannot take the time to answer it.

          You can repair office by going to add remove/programs. In Windows 7 right click and choose “Change.” An option to repair will be there.

          I have also encountered the “sending the command to the program” error. Have you tried unticking “Ignore other applications that use Dynamic Data Exchange (DDE)” and then seeing if double click works to open the file?

        • brian says:

          nevermind i guess the error is happening on the rest after it works one time…looks like i will be reinstalling…thx

  36. Zsolt says:

    Thank you very much for this application.
    Very-very helpful, shame on Microsoft for not solving this in an easier, built-in way.

  37. Serg says:

    Great application.

    The only thing I don’t like about all this is next:
    when I have xls and xlsx files in the same folder, I could find out which of them are xls by looking at Type column, when in Details View. It was different for xls and xlsx.

    And now instead of 2 different Types, there’s only 1 – Excel Launcher File.
    This is a little discomfort for me.

    And I don’t want to turn off “Hide extensions” option.

  38. iiyama says:

    Nice app seems to work well. I was just wondering if it were possible to disable the Excel splash screen when excel files were opened.? I know it’s a small issue but I thought I’d ask incase you had any ideas. Apart from this I don’t have any issues.

    • Tom Sherman says:

      As you probably know the /e switch will disable the splashscreen for Microsoft Excel. Unfortunately Excel Launcher only passes along the first switch (filepath) and not additional switches. If enough people requested this feature I would update the code to pass in all arguments, but as of now you are the first.

  39. Jennieg says:

    This application is excellent! Thank you so much. I have been fighting in Xcel non-stop lately, and your application has fixed all the issues I was having.

    Great work!

  40. This is great program.

    Thank you so much!!

  41. S. Berry says:

    THANK YOU!!

  42. Mike says:

    For the love of god, thank you.

    I had excel all set up to open sheets in different instances on a previous computer (via the “Folder options”>DDE route), but I have no idea why it wouldn’t work on my new computer. Your solution is great.

  43. bob shin says:

    Wow. This is what I was looking for.

    kudos

  44. Boris says:

    Hi Thomas,
    thanks for this brilliant solution, it works great! The only drawback is the clipboard issue, it is now impossible to copy a worksheet to a different Excel file or connect a cell to a cell in a different worksheet. Not something I need everyday, but now and again. As a workaround in those cases, I just right-click the Excel files and select Open with Excel instead of the Excel Launcher.

  45. Dyson says:

    Hey Tom,

    Would you mind sending me the details of how to work around this issue without installing your app? Please don’t take offense to that, it is just I am trying to do this on a work computer and don’t like to install software on it. Thank you!

    Dyson

    • Tom Sherman says:

      Hi Dyson, sorry I’m just getting to this now. Yes, I would be happy to give you some tips on doing this without an app. It has been a long time since I wrote this, so I am afraid a bunch of the details on MS registry changes for Win7 are fuzzy, but I am sure they can be teased back out.

  46. Justin says:

    This little program is amazing. Why M$ decided that opening excel spreadsheets in the same window would be a good idea, I will never understand. This will be extremely helpful for some of my co-workers. Thanks again and I will be sure to spread the word on this program!

  47. Greg says:

    Thanks Tom,

    Your little app has made a big difference in the way I work!

    Appreciate it!

  48. David says:

    Is it possible to call excel launcher from a script? does excel launcher have a valid automation launcher name or handle? I’d like to have the script open files for me, 1 at a time. file 1 opens, I make my changes, then after I close that instance, a new instance opens with file2, and so on, until the end of the colFileList is array is reached. Is this possible? Brilliant minds help me out here – Thanks!!!
    David K. “Guyver”

    Script:
    strComputer=”.”
    Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\cimv2″)
    Dim colFileList
    colFileList=Array(“Z:\path\file1xlsx”,”Z:\path\file2.xlsx”)
    For Each objFile In colFileList
    Set objExcel = CreateObject(“Excel.Application”)
    objExcel.Visible = True
    objExcel.Workbooks.Open objFile,True
    Next

    • David says:

      This example opens all instances with regular excel (no launcher) and tries to open them all at once…

    • Tom Sherman says:

      As opposed to creating a wrapper for excel launcher, which is a wrapper for excel, I think it would make more sense to write your own. All Excel Launcher does is create Excel processes just like your example code.


      //create your own exe that accepts a file list

      //create excel instance to open first file
      Process excel = new Process();
      excel.StartInfo.FileName = sExcelPath;
      excel.StartInfo.Arguments = sFilePath;
      excel.Start();

      //use event handler to trigger next file open
      excel.Exited += new EventHandler(excel_Exited);

  49. Tony Hodson says:

    Hi, just installed your Excel fix, works a treat many thanks.
    Win7, x86 system, office 2007

  50. J Chan says:

    Try this

    try adding the shortcut to Excel in your “Send To” so that when you right-click an Excel file, Excel is an option. It opened in separate instances of Excel, was (and is) easy to use and worked like a charm for me.

    Good Luck ..

Leave a Reply