3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/asposeslidesjava/Tables/removerowcolumn.rb', line 3
def initialize()
data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/Tables/'
pres = Rjb::import('com.aspose.slides.Presentation').new
slide = pres.getSlides().get_Item(0)
col_width = [100, 50, 30]
row_height = [30, 50, 30]
table = slide.getShapes().addTable(100, 100, col_width, row_height)
table.getRows().removeAt(1, false)
table.getColumns().removeAt(1, false)
save_format = Rjb::import('com.aspose.slides.SaveFormat')
pres.save(data_dir + "RemoveRowColumn.pptx", save_format.Pptx)
puts "Removed Row & Column from table, please check the output file."
end
|