|
// C# Excel Writer library v2.0
// by Serhiy Perevoznyk, 2008-2011
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
namespace XLSExportDemo
{
public class Cell
{
private ExcelDocument document;
private CellInfo cellInfo;
internal Cell(int row, int column, ExcelDocument document)
{
this.document = document;
cellInfo = document.GetCellInfo(row, column);
}
internal ExcelDocument Document
{
get { return this.document; }
}
public object Value
{
get { return cellInfo.Value; }
set { cellInfo.Value = value; }
}
public string Format
{
get { return cellInfo.Format; }
set
{
cellInfo.Format = value;
if (!document.Formats.Contains(value))
document.Formats.Add(value);
}
}
public ExcelColor BackColor
{
get { return cellInfo.BackColor; }
set { cellInfo.BackColor = value; }
}
public ExcelColor ForeColor
{
get { return cellInfo.ForeColor; }
set { cellInfo.ForeColor = value; }
}
public Font Font
{
get { return cellInfo.Font; }
set { cellInfo.Font = value; }
}
public Alignment Alignment
{
get { return cellInfo.Alignment; }
set { cellInfo.Alignment = value; }
}
public int Row
{
get { return cellInfo.Row; }
}
public int Column
{
get { return cellInfo.Column; }
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.