MS Excel files are largely used to keep tabular data in the form of worksheets. Often, the huge datasets are also maintained in Excel files. Therefore, you may come across the scenario where you need to read and fetch data from the worksheets in an Excel file. To achieve that, this article shows how to read an Excel file in C#. We will demonstrate how to read the whole Excel file or only a single worksheet programmatically.