C1.WPF.Excel Namespace : XLCell Class |
'Declaration
Public Class XLCell Implements ICloneable
public class XLCell : ICloneable
To create cells, use the XLSheet indexer (Item property). If the cell already exists, the reference will be returned as usual. If not, the sheet will create the cell (as well as rows and columns if necessary) and will return a reference to the new cell.
Because it creates cells automatically, the indexer is especially useful when creating and populating sheets.
C1XLBook book = new C1XLBook(); XLSheet sheet = book.Sheets[0]; for (int r = 0; r < 10; r++) { for (int c = 0; c < 10; c++) { XLCell cell = sheet[r, c]; cell.Value = (r+1) * (c+1); } } book.Save(@"c:\temp\test.xls");
System.Object
C1.WPF.Excel.XLCell
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2