RhSolutions-AddIn/RhSolutions.ExcelExtensions/Cell.cs
2023-04-06 08:29:39 +03:00

27 lines
599 B
C#

namespace RhSolutions.ExcelExtensions;
public sealed class Cell
{
public Table ParentTable { get; }
public Row ParentRow
{
get => ParentTable.Rows[ParentTable.Range.Row - _range.Row];
}
public Column ParentColumn
{
get => ParentTable.Columns[ParentTable.Range.Column - _range.Column];
}
public object Value
{
get => _range.Cells[1, 1].Value2;
set => _range.Cells[1, 1].Value2 = value;
}
private Range _range;
public Cell(Range range, Table table)
{
_range = range;
ParentTable = table;
}
}