![]() The ReadInData class: public class ReadInData In this code I create a new ReadInData class, to which I pass the path, the name of the file and the name of the Excel sheet that I want to read.Ĭoncern here: is it okay to pass those things within that file? IEnumerable recipients = readInData.GetData() Ĭatch (WorksheetDoesNotExistException ex)Ĭatch (FileToBeProcessedIsNotInTheCorrectFormatException ex) The entry point of my code: class Program Passing of the isFirstRowAsColumnNames parameterīecause this is code for a company, I changed the names of a couple of classes, so I know they aren't the best of names.Should I encapsulate my ExcelData class within ReadInData, or keep it like it is?.The overall construction of the code and code quality.On top of that class I made a ReadInData class, which will get the specific columns I want from the Excel sheet. I've implemented a low-level class called ExcelData which uses the ExcelDataReader and does things like figuring out if it is an ".xls" of ".xslx" file (or maybe something completely unrelated!) etc. ![]() I want to import an Excel file, and read the rows of certain columns.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |