Skip to main content
Skip table of contents

insertTableRow

Versionshinweise

22.1, 21.2.06, 21.1.11

Code

GROOVY
boolean insertTableRow(PresentationDocument document, String identifier, int pageIndex, int rowIndexForInsert, int rowIndexForClone)

Beschreibung

Einfügen einer weiteren Zeile in der referenzierte Tabelle an der angegebenen Position. Die im optionalen Argument rowIndexForClone referenzierte Zeile wird als Formatierungsbasis für die zu einzufügende Zeile verwendet.

Parameter

  • document

    Repräsentiert die Präsentationsdatei
  • identifier
    Name der Tabelle
  • pageIndex
    Index der Seite, auf der sich die Tabelle befindet (erste Seite startet mit 1)
  • rowIndexForInsert
    Index der Zeile, an der die neue Zeile eingefügt werden soll (erste Zeile startet mit 1)
  • rowIndexForClone
    Optionaler Parameter zur Auswahl der Zeile, deren Formatierung und Layout als Basis für die neue Zeile verwendet werden soll. (erste Zeile startet mit 1)
    Standardvorgabe ist 1

Rückgabe

Liefert true, wenn das Einfügen der Zeile in der Tabelle erfolgreich war, ansonsten false.

Beispiele

GROOVY
IPresentationResult openResult = PresentationUtils.openFile("C:\\Work\\myFirstPresentation.ppsx");

if (!PresentationUtils.isSuccessful(openResult))
{
	/** handle error code */
    return;
}

PresentationDocument presentation = null;
try
{
  presentation = PresentationUtils.getPresentationDocument(openResult);

  String identifier = "myTable";
  int pageIndex = 1;

  if (PresentationUtils.existsComponent(presentation, identifier, pageIndex))
  {
	   /** insert row at first position of table "myTable" */
       boolean success = PresentationUtils.insertTableRow(presentation, identifier, pageIndex, 1);
       ...
  }
}
finally
{
  PresentationUtils.close(presentation);
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.