Hi Philip,
I'm sorry for the late reply. I was at two e-invoice conferences last week
and at FOSDEM over the weekend.
I realized, I already added once a topic on "how to find a feature" in our
FAQ:
https://tdf.github.io/odftoolkit/developer-faq_finding-odf-feature.html#
But as I am on the train back, I might assist you a bit as an excuse for
the belayed response...
As I can not remember to have used the Named Ranges feature, I quickly
looked it up:
https://help.libreoffice.org/latest/he/text/scalc/01/04070100.html
and created as quickly a quick ODS test file (attached) to see how the
feature is named in XML:
[image: image.png]
which looks in XML of the content.xml like
[image: image.png]
According to the FAQ answer, I now searched for the feature in the sources
odftoolkit/odfdom/src/main/java
and looked for the specific features XML
find . -type f | xargs grep xpressions
As you are interested in functionality with high usability, the DOC package
is more interesting than the fully generated DOM package, so there is only
one hit:
./org/odftoolkit/odfdom/doc/table/OdfTableCellRange.java
So there is no test and when looking into the JavaDoc of the above class
there is no functionality to get all Named Ranges:
https://tdf.github.io/odftoolkit/api/odfdom/org/odftoolkit/odfdom/doc/table/OdfTableCellRange.html
Just the ability to create new Named Ranges:
https://github.com/tdf/odftoolkit/blob/master/odfdom/src/main/java/org/odftoolkit/odfdom/doc/table/OdfTableCellRange.java#L63
Any pull request is most welcome! :-)
Hope this can be of help to you, Philip!
Svante
On Mon, 27 Jan 2025 at 15:40, Philip Nienhuis <pr.nienhuis@hccnet.nl> wrote:
Hi, subject says all :-)
I've seen mention of Named Ranges methods in various ODF Toolkit Javadoc
places and mailing lists (the latter back to even 2013), but nowhere can
I find how I can get a simple list of Named Ranges in an .ods
spreadsheet, maybe even incl. range name, worksheet name and cell range
for each Named Range, starting from a workbook object.
Background:
Note I'm no Java programmer, not at all, I have just basic insight in Java.
But I'm a contributor to the Octave project and maintainer (since 2008)
of the Octave add-on "io package" (see https://www.octave.org for main
project, https://packages.octave.org for add-on packages and
https://gnu-octave.github.io/packages/io/ for the io package).
I'm using Octave's Java subsystem to invoke external Java SW methods for
spreadsheet I/O. That has been working fine for many external Java
projects, e.g., Apache POI, JExcelApi, OpenXLS, jOpenDocument, and even
the LibreOffice Java-UNO bridge and -yes- ODF Toolkit.
I'm busy updating the io package for a new release so would very much
like to update the ODF Toolkit support in that package as well.
Thanks.
Philip Nienhuis
--
To unsubscribe e-mail to: dev+unsubscribe@odftoolkit.org
Problems?
https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.odftoolkit.org/dev/
Privacy Policy: https://www.documentfoundation.org/privacy
--
To unsubscribe e-mail to: dev+unsubscribe@odftoolkit.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.odftoolkit.org/dev/
Privacy Policy: https://www.documentfoundation.org/privacy
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.