I have a case where a cell has rich text/anchor. I'm trying to get the anchor/href attribute of the cell. I can access the text as follows, using Simple ODF:
InputStream stream = new URL(some"-url-here").openStream();
Row row = SpreadsheetDocument
.loadDocument(stream)
.getSheetByIndex(0)
.getRowIterator()
.next();
String value = row.getCellByIndex(5).getStringValue();
Here's the library I'm using:
<!-- https://mvnrepository.com/artifact/org.odftoolkit/simple-odf -->
<dependency>
<groupId>org.odftoolkit</groupId>
<artifactId>simple-odf</artifactId>
<version>0.9.0</version>
</dependency>
This returns the text in the cell, but when I open the ODS file with Excel, I see that the cell has a URL/href. I'm looking for a way to get the url.
I can be done with: