none
Visual Studio 2015 - connecting to Excel and CSV

    Question

  • I've just started Visual Studio 2015 Professional with Data Tools enabled on Windows Server 2012. Trying to connect to either an Excel file or csv has not worked. I follow the steps:

    1. From VS, I click on "Tools"
    2. Click on "Connect to Database"
    3. Click on "Microsoft OBDC Data Source" (note there are no other "OBDC" choices from the list
    4. Click on "Use a connection string" and then "Build"
    5. Navigate to a folder that has oth a .xlsx file and a .csv file. Neither appear as visible. I can provide a screen capture.

    So at this point I'm thinking I don't have the right driver. I navigate toand install the driver, but no change to Visual Studio (restarted VS but not the server).

    All online help points to either SQL Server 2016 (I have 2012 and am upgrading, soon) or VS 2013 and use "Business Intelligence Tools" which doesn't seem available for VS 2015. What I want to do is really, really simple and you would think that Excel and VS, both being Microsoft products would play nicely together, but there seems to be a bunch of additional, non-intuitive steps that is turning into an exercise in frustration. If anyone can point to some steps that actually work for VS 2015 I would be forever grateful. Thanks in advance.



    • Edited by Joseph_at_MaRS Wednesday, March 23, 2016 3:19 PM specified version of vs
    Wednesday, March 23, 2016 2:25 PM

Answers

  • Hi Joseph,

    I have tested with my Visual Studio Professional 2015 with following steps. The previous four steps are the same with yours, so I describe my steps from the 5th step.

    1. Navigate to a folder that has oth a .xlsx file and a .csv file. And I also can't find my csv file in the folder. Then click the "New..."
    2. Choose a driver for your data source file. In my test, I'm using csv file, so I choose "Microsoft Text Driver(*.txt;*.csv)".
    3. Please click the "Browse..." button to choose the data source file that you want to connect. Note: please choose All files, which can let us select our csv and excel files.
    4. Then please click the Finish and OK button finish the connection.

    After that, you will find that there will create a new .csv file but its Type of file is Data Source File (.DSN). My original .csv file's Type of file is CSV file. This is why our csv and excel file can't be found on the folder. Please convert your excel and .csv file to DSN file first.

    Best Regards,
    Weiwei

    Thursday, March 24, 2016 7:42 AM
    Moderator

All replies

  • Hi Joseph,

    I have tested with my Visual Studio Professional 2015 with following steps. The previous four steps are the same with yours, so I describe my steps from the 5th step.

    1. Navigate to a folder that has oth a .xlsx file and a .csv file. And I also can't find my csv file in the folder. Then click the "New..."
    2. Choose a driver for your data source file. In my test, I'm using csv file, so I choose "Microsoft Text Driver(*.txt;*.csv)".
    3. Please click the "Browse..." button to choose the data source file that you want to connect. Note: please choose All files, which can let us select our csv and excel files.
    4. Then please click the Finish and OK button finish the connection.

    After that, you will find that there will create a new .csv file but its Type of file is Data Source File (.DSN). My original .csv file's Type of file is CSV file. This is why our csv and excel file can't be found on the folder. Please convert your excel and .csv file to DSN file first.

    Best Regards,
    Weiwei

    Thursday, March 24, 2016 7:42 AM
    Moderator
  • Thanks so much! I'm just getting this message now, but I'll definitely try this out in the next day or so. I'll let you know how it goes. Cheers.
    Monday, March 28, 2016 4:55 PM
  • Hi Joseph,

    Thanks for your response.

    I will wait for your test result and if any questions when trying, please feel free to let me know.

    Best Regards,
    Weiwei

    Tuesday, March 29, 2016 1:34 AM
    Moderator