We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Inserted table column header cell reference

Hi,


I need to get the cell reference of the header cell by passing the table name and header name of an inserted table. Please provide a solution. Thanks in advance.



Hi Bee,


Thank you for contacting Aspose support.

Please consider the following piece of code that reads the ListObject’s (Table’s) column headers.

Java

Workbook book = new Workbook(“D:/book1.xlsx”);
ListObject table = book.getWorksheets().get(0).getListObjects().get(0);
System.out.println(“Displaying Headers”);
for (int i=table.getStartColumn(); i<=table.getEndColumn(); i++)
{
System.out.println(book.getWorksheets().get(0).getCells().get(table.getStartRow(), i).getDisplayStringValue());
}