Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6215179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:00:30+00:00 2026-05-24T07:00:30+00:00

I have several excel sheets which I’d like to work with different Excel versions

  • 0

I have several excel sheets which I’d like to work with different Excel versions using VB.NET

Basically, I want to choose which Excel version I will open certain worksheet using VB.NET. Is there any way to know which Excel version is installed in the machine and how many versions with VB.NET? And how do I choose which Excel version I will open it?

I’d like to know it through programming, I know that this can be done if you take a look at the registry keys in the machine. Although, what I need is to create a software that asks the user for the Excel version he want to open

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T07:00:31+00:00Added an answer on May 24, 2026 at 7:00 am

    The following code snippet gets a list of all the installed copies of Excel on the computer (this has been tried and tested on a Windows XP machine, running both Excel 2003 and 2007).

    Dim reg As RegistryKey
    Dim subKey As RegistryKey
    Dim rtn As New Dictionary(Of String, String)
    
    reg = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Office")
    If reg IsNot Nothing Then
        For Each subKeyName As String In reg.GetSubKeyNames
            subKey = reg.OpenSubKey(subKeyName)
            If subKey IsNot Nothing Then
                If subKey.GetSubKeyNames().Contains("Excel") Then
                    subKey = subKey.OpenSubKey("Excel\InstallRoot")
                    rtn.Add(subKeyName, subKey.GetValue("Path").ToString)
                End If
            End If
        Next
    End If
    For Each kvp In rtn
        MessageBox.Show(String.Format("Version: {0} at '{1}Excel.exe'", kvp.Key, kvp.Value))
    Next
    

    In the variable rtn you have a dictionary of the versions (the key) and the directory that Excel is installed in (the value). As you can see in the MessageBox bit at the end of my code, you’ll need to add “Excel.exe” to the end of it.

    Now you have the location of the installed copies of Excel and their versions, you can create a form which lists them, to allow for the user to select which version they wish to use.

    Whilst I’m sure you can find the command line for opening an Excel spreadsheet with Excel, I thought I would include it here for completeness;

    excel.exe "c:\My Folder\book1.xlsx"
    

    (http://office.microsoft.com/en-us/excel-help/command-line-switches-for-excel-HA010158030.aspx)

    A slightly more full explanation of how to identify installed Excel versions and their location.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have several .NET applications that monitor a directory for new files, using FileSystemWatcher.
Excel 2007: I have an app which outputs several rows, with pipe delimiters, into
I have an Excel sheet where several rows are grouped together using Group and
i have 500 excel sheets which are used for data collection from various organisations
The company I work at is run on Excel sheets. Several of those sheets
I'm writing an Excel Addin using COM Interop from .net. I have a command
I have several sparsely populated tables in an Excel workbook from which I need
I have several RequiredFieldValidators in an ASP.NET 1.1 web application that are firing on
I have several old 3.5in floppy disks that I would like to backup. My
I have an excel document with a master sheet, as well as several child

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.