Use the following code, I can’t get the right value of text in table
image.png (10.3 KB)
78ddccfea733f7a6b89a23dc9c0ef40.png (65.3 KB)
table.zip (31.9 KB)
import com.aspose.slides.*;
public class TestConvert {
public static void main (String[] args) throws Exception {
Presentation presentation = new Presentation("table.pptx");
IShape shape = presentation.getSlides().get_Item(0).getShapes().get_Item(0);
if (shape instanceof ITable) {
ITable table = (ITable) shape;
IColumnCollection columns = table.getColumns();
IRowCollection rows = table.getRows();
for (int i = 0; i < columns.size(); i++) {
IColumn column = columns.get_Item(i);
for (int j = 0; j < rows.size(); j++) {
ICell cell = column.get_Item(j);
byte strikethroughType = cell.getTextFrame().getTextFrameFormat().getEffective().getTextStyle().getDefaultParagraphFormat().getDefaultPortionFormat().getStrikethroughType();
byte fontUnderline = cell.getTextFrame().getTextFrameFormat().getEffective().getTextStyle().getDefaultParagraphFormat().getDefaultPortionFormat().getFontUnderline();
boolean fontBold = cell.getTextFrame().getTextFrameFormat().getEffective().getTextStyle().getDefaultParagraphFormat().getDefaultPortionFormat().getFontBold();
float fontHeight = cell.getTextFrame().getTextFrameFormat().getEffective().getTextStyle().getDefaultParagraphFormat().getDefaultPortionFormat().getFontHeight();
boolean fontItalic = cell.getTextFrame().getTextFrameFormat().getEffective().getTextStyle().getDefaultParagraphFormat().getDefaultPortionFormat().getFontItalic();
int alignment = cell.getTextFrame().getTextFrameFormat().getEffective().getTextStyle().getDefaultParagraphFormat().getAlignment();
byte fillTypeText = cell.getTextFrame().getTextFrameFormat().getEffective().getTextStyle().getDefaultParagraphFormat().getDefaultPortionFormat().getFillFormat().getFillType();
byte fillTypeCell = cell.getCellFormat().getFillFormat().getEffective().getFillType();
}
}
}
}
}