public void DisplayCell() { string fp = ChooseFilePath(); // Uses function below to find file path Excel excel = new Excel(fp, 1); // Creates a new instance of the Excel class addListItem(excel.ReadCell(0, 0)); // Uses the excel class function ReadCell and displays result in the listbox }
public void OpenFile(int sheet) { Excel excel = new Excel("C:\\Users\\320051\\Desktop\\Copy_EAM_WIP_v7.xlsx", sheet); MessageBox.Show(excel.ReadCell(1, 0), excel.LastRow().ToString()); }