Andy Williams Andy Williams - 2 months ago 16
C# Question

Adding Excel File to Project in Solution Explorer

Selenium WebDriver
Visual Studio 2015

I am trying to add an Excel File that I have existing on my computer to the Solution Explorer in my Project, but when I try to look for the existing item (or add a new item for that matter) looking for an excel file nothing related to a xlsx File exists, not sure if I am missing a nuget package I have tried to download everyting i know pertinent to the project. please help

enter image description here

Answer

You don't add the file using the Add Item dialogue.

You can right click on the project in the Solution Explorer and go to Add and then Existing Item and find the file in the project directory.

or

You can just put the file in the project's folder directory, check Show All Files in the Solution Explorer panel, and then find the file, wherever you put it in the directory, right click and then go to Include In Project.

enter image description here