Delete a Table Row Introduction
Aspose.Slides.Cloud API allows deleting table rows. If the optional “withAttachedRows” parameter is set, rows that have common merged cells with the target row will be deleted as well.
DeleteTableRow
API
Type
Description
Resource
/slides/{name}/slides/{slideIndex}/shapes/{shapeIndex}/rows/{rowIndex}
DELETE
Returns table info
DeleteTableRow
Examples
cURL Example
Assume that we have a table with four rows and intend to delete the second row. The second and the third row have a common merged cell. Since the “withAttachedRows” parameter is set, the third row will be removed as well.
SDK Examples
C#
SlidesApi api = new SlidesApi ( "MyClientId" , "MyClientSecret" );
int slideIndex = 9 ;
int shapeIndex = 1 ;
int rowIndex = 2 ;
bool withAttachedRows = true ;
Table response = api . DeleteTableRow ( "MyPresentation.pptx" , slideIndex , shapeIndex , rowIndex , withAttachedRows );
Console . WriteLine ( "Table rows count: " + response . Rows . Count );
Java
SlidesApi api = new SlidesApi ( "MyClientId" , "MyClientSecret" );
int slideIndex = 9 ;
int shapeIndex = 1 ;
int rowIndex = 2 ;
Boolean withAttachedRows = true ;
Table response = api . deleteTableRow ( "MyPresentation.pptx" , slideIndex , shapeIndex , rowIndex , withAttachedRows , null , null , null );
System . out . println ( "Table rows count: " + response . getRows (). size ());
PHP
use Aspose\Slides\Cloud\Sdk\Api\Configuration ;
use Aspose\Slides\Cloud\Sdk\Api\SlidesApi ;
use Aspose\Slides\Cloud\Sdk\Model\Table ;
$config = new Configuration ();
$config -> setAppSid ( "MyClientId" );
$config -> setAppKey ( "MyClientSecret" );
$api = new SlidesApi ( null , $config );
$slideIndex = 9 ;
$shapeIndex = 1 ;
$rowIndex = 2 ;
$withAttachedRows = true ;
$result = $api -> deleteTableRow ( "MyPresentation.pptx" , $slideIndex , $shapeIndex , $rowIndex , $withAttachedRows );
print ( "Table rows count: " . count ( $result -> getRows ()));
Ruby
configuration = AsposeSlidesCloud :: Configuration . new
configuration . app_sid = "MyClientId"
configuration . app_key = "MyClientSecret"
api = AsposeSlidesCloud :: SlidesApi . new ( configuration )
slide_index = 9
shape_index = 1
row_index = 2
with_attached_rows = true
result = api . delete_table_row ( "MyPresentation.pptx" , slide_index , shape_index , row_index , with_attached_rows )
puts "Table rows count: #{ result . rows . length } "
Python
import asposeslidescloud
from asposeslidescloud.configuration import Configuration
from asposeslidescloud.apis.slides_api import SlidesApi
configuration = Configuration ()
configuration . app_sid = 'MyClientId'
configuration . app_key = 'MyClientSecret'
api = SlidesApi ( configuration )
slide_index = 9
shape_index = 1
row_index = 2
with_attached_table_rows = True
response = api . delete_table_row ( "MyPresentation.pptx" , slide_index , shape_index , row_index , with_attached_table_rows )
print ( f "Table rows count: { len(response.rows) }" )
Node.js
const CloudSdk = require ( "asposeslidescloud" );
const api = new CloudSdk . SlidesApi ( "MyClientId" , "MyClientSecret" );
let slideIndex = 9 ;
let shapeIndex = 1 ;
let rowIndex = 2 ;
let withAttachedRows = true ;
const result = await api . deleteTableRow ( "MyPresentation.pptx" , slideIndex , shapeIndex , rowIndex , withAttachedRows );
console . log ( "Table rows count: " + result . body . rows . length );
Go
cfg := asposeslidescloud . NewConfiguration ()
cfg . AppSid = "MyClientId"
cfg . AppKey = "MyClientSecret"
api := asposeslidescloud . NewAPIClient ( cfg )
fileName := "MyPresentation.pptx"
var slideIndex int32 = 9
var shapeIndex int32 = 1
var rowIndex int32 = 2
var withAttachedRows bool = true
result , _ , e := api . SlidesApi . DeleteTableRow ( fileName , slideIndex , shapeIndex , rowIndex , & withAttachedRows , "" , "" , "" )
if e != nil {
fmt . Printf ( "Error: %v." , e )
return
}
fmt . Printf ( "Table rows count: %v" , len ( result . GetRows ()))
C++
Perl
use AsposeSlidesCloud::Configuration ;
use AsposeSlidesCloud::SlidesApi ;
use AsposeSlidesCloud::Object::Table ;
my $config = AsposeSlidesCloud::Configuration -> new ();
$config -> { app_sid } = "MyClientId" ;
$config -> { app_key } = "MyClientSecret" ;
my $api = AsposeSlidesCloud::SlidesApi -> new ( config => $config );
my %params = (
'name' => "MyPresentation.pptx" ,
'slide_index' => 9 ,
'shape_index' => 1 ,
'row_index' => 2 ,
'with_attached_rows' => 'true' );
my $response = $api -> delete_table_row ( %params );
print "Table rows count: scalar @{$response->{rows}} \n" ;
Swift
SDK Source
The Aspose for Cloud SDKs can be downloaded from the following page: Available SDKs