DIAdem Help

Method: Remove for 2DTableColumns

  • Updated2024-09-12
  • 1 minute(s) read

Method: Remove for 2DTableColumns

Deletes a column from a 2D table in DIAdem REPORT.

Object.Remove(Index)
Object2DTableColumns
Object with this method
IndexLongInteger
Specifies the table column.

The following example deletes from each 2D table of the current worksheet the column with the highest index:

VBScriptPython

 

Dim oMyReportObj, oMyReportObjects, iColumnCount 
Set oMyReportObjects = Report.ActiveSheet.Objects
For Each oMyReportObj in oMyReportObjects
  If oMyReportObj.ObjectType = eReportObject2DTable Then
    iColumnCount = oMyReportObj.Columns.Count 
    If iColumnCount > 1 Then
      Call oMyReportObj.Columns.Remove(iColumnCount)
    End If
  End If
Next