Results 1 to 8 of 8

Thread: how to import & export Excel files in VB.Net

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2010
    Posts
    74

    Resolved how to import & export Excel files in VB.Net

    I'm developing a WinForms desktop application using VB.Net, and one of the features I want to include is the ability to import from, and export to, Excel (both .xls and .xlsx), .csv and .psv files. When I had to implement similar functionality at my last job, it was usually pretty straightforward, but I occasionally ran into issues where the code worked properly on my development machine but not on an end user's machine. My recollection is that the problem SEEMED to be due to either the two machines having different versions of Office installed, or perhaps the end user's machine not having ANY version of Office installed. The application I'm building is for non-technical home users with no IT support, so it needs to just work. My questions are:
    1. What's the best approach to implementing the Excel import/export functions to ensure that those functions work reliably regardless of which version of Excel the end user has installed (or even if they don't have Excel installed at all). Specifically, I'm asking which reference(s) I need to add to the project. My web research indicates that most folks are using various versions of the Microsoft Excel Object Library or Microsoft.Office.Interop.Excel.
    2. Depending on the answer to question 1., I may need to install something else on my development machine, because the latest version of the Excel Object Library I have showing in my References window is 11.0, and I don't have any version of Microsoft.Office.Interop.Excel. So, if I do need to install something else, what is it and where can I download it from?

    Thanks in advance for any assistance you can give.
    Last edited by silverblatt; Feb 27th, 2023 at 09:41 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width