Gets the number of columns actually contained in the table.
Syntax
Property Value
Type:System.Int32
The number of columns actually contained in the table.
Example
The following code example shows the value of the
ColCount property at various points in the life of a table. First gets columns count from empty table, after adds a new row and gets columns count.
| C# | Copy Code |
|---|
// get table by name "MyTable"
IZennoTable table = project.Tables["MyTable"];
// get columns count
int colCount = table.ColCount;
// set rows separator
table.ColSeparator = ":";
// add row to table
table.AddRow("one:two:three:four");
// get columns count
if (table.ColCount != colCount) return "Columns count was changed";
return "Columns count wasn't changed"; |
| PHP | Copy Code |
|---|
// get table by name "MyTable"
$table = $project->Tables->get_Item("MyTable");
// get columns count
$colCount = $table->ColCount;
// set rows separator
$table->ColSeparator = ":";
// add row
$table->AddRow("one:two:three:four");
// get columns count
if ($table->ColCount != $colCount) return "Columns count was changed";
return "Columns count wasn't changed"; |
Requirements
Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows Seven
See Also