Class CellWatch
Contents
[
Hide
]CellWatch class
Represents Cell Watch Item in the ‘watch window’.
public class CellWatch
Constructors
Name | Description |
---|---|
CellWatch() | The default constructor. |
Properties
Name | Description |
---|---|
CellName { get; set; } | Gets and sets the name of the cell. |
Column { get; set; } | Gets and sets the column of the cell. |
Row { get; set; } | Gets and sets the row of the cell. |
Examples
[C#]
namespace Demos
{
using Aspose.Cells;
using System;
public class CellWatchDemo
{
public static void CellWatchExample()
{
// Instantiating a Workbook object
Workbook workbook = new Workbook();
// Get the first Worksheet.
Worksheet sheet = workbook.Worksheets[0];
// Add Cell Watch Item into the watch window
int watchIndex = sheet.CellWatches.Add("B2");
// Retrieve the CellWatch object
CellWatch cellWatch = sheet.CellWatches[watchIndex];
// Setting properties
cellWatch.Row = 1; // B2 corresponds to row 1 (0-based index)
cellWatch.Column = 1; // B2 corresponds to column 1 (0-based index)
cellWatch.CellName = "B2";
// Save the workbook
workbook.Save("CellWatchExample.xlsx");
workbook.Save("CellWatchExample.pdf");
return;
}
}
}
See Also
- namespace Aspose.Cells
- assembly Aspose.Cells