jferard / fastods

A very fast and lightweight (no dependency) library for creating ODS (Open Document Spreadsheet, mainly for Calc) files in Java. It's a Martin Schulz's SimpleODS fork
GNU General Public License v3.0
36 stars 6 forks source link

Add ForeignTable class #131

Closed jferard closed 5 years ago

jferard commented 6 years ago

A foreign table is a table from another ods file. It is defined by a file and a name. Would be useful for filters, links, ...

To do: check if this complies the OASIS standard before doing anything.

jferard commented 5 years ago

Checked:

19.910.33 The xlink:href attribute specifies the target location of a hyperlink. The xlink:href attribute is usable with the following element: 6.1.8. The xlink:href attribute has the data type anyIRI 18.3.2.

jferard commented 5 years ago

Example:

'file:///path/to/file.ods'#$sheet.A1
jferard commented 5 years ago

PositionUtil and PositionBuilder should do the trick with a little modification.

jferard commented 5 years ago

Design:

jferard commented 5 years ago
address string --- parse ---> file, table, position (row, col) or range (row1, col1, row2, col2) for FastODS internal use.

position (row, col) --- toString ---> positionRef (for urls)
range (row1, col1, row2, col2) --- toString ---> positionRef (for urls)
table --- getName ---> tableRef (for urls)