[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.CsvParseContext.Row

Row Property

Row

Gets the row index of the current cell.

Declaration
public int Row { get; }
Public ReadOnly Property Row As Integer
Examples
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;
        }
    }
}