Julian Gonzalez

Generation

generate functionWed, 29 Mar 2023

Read excel file in .Net 6

public void ReadExcel(string filePath) { var fileExt = Path.GetExtension(filePath); if (fileExt == ".xls") { //... } else if (fileExt == ".xlsx") { //... } else { throw new Exception("Wrong file type"); } }

Questions about programming?Chat with your personal AI assistant