[]
Gets the row index of the current cell.
public int Row { get; }
Public ReadOnly Property Row As Integer
CsvOpenOptions options = new CsvOpenOptions();
options.Parser = new RowAwareParser();
string filePath = Path.Combine(Path.GetTempPath(), "data.csv");
File.WriteAllText(filePath, "Code\n0012");
workbook.Open(filePath, options);
IWorksheet activeSheet = workbook.ActiveSheet;
class RowAwareParser : ICsvParser
{
public void Parse(CsvParseResult result, CsvParseContext context)
{
int row = context.Row;
if (row > 0)
{
result.Value = context.Text;
}
}
}