Hi,
I am using c# and I am trying to read excel files, one row at a time, determining if the row is blank, a title or general data the returning it to a csv file. I have outlined code that I have been writing but I don't think I am quite there yet. I am also trying to check blank rows a number of times before finishing or/and throwing exceptions if incorrect data or empty file. I still think I have more to do, but if anyone can help, it would be appreciated.
Code:Records = openExcelFile List<csv> csv Foreach (record in records) { rowType = ValiateRow(record); switch (rowTYpe) { Case RowType.Header: Continue; Case RowType.Blank: blankRows++; if (blankRows > maxBLankRows) return; else continue; Case RowType.Valid: CSV csv = ConvertTOCsv(record) If (daf!= null) Daff.add(csv); Continue; } // End switch } // Foreach record
Bookmarks