RhSolutions-AddIn/RhSolutions.AddIn/ExcelTable/ExcelTableCell.cs

25 lines
594 B
C#
Raw Normal View History

2023-03-31 15:27:31 +03:00
namespace RhSolutions.ExcelTable;
public sealed class ExcelTableCell : ExcelTable
{
public ExcelRow ParentRow
{
get => ParentTable.Rows[ParentTable.Range.Row - Range.Row];
}
public ExcelColumn 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;
}
public ExcelTableCell(Range range, ExcelTable table) : base(range, table)
{
Range = range;
ParentTable = table;
}
}