[Solved] Transform CellAddress to cell name using Java
[Solved] Transform CellAddress to cell name using Java
Is there a way to get human readable version of CellAddress struct? I desperately want to transform Sheet = 1, Column = 1, Row = 1 into simple and sleek A1 (or even 1.A1)
Last edited by RoryOF on Mon May 28, 2018 9:11 pm, edited 2 times in total.
Reason: Added green tick [RoryOF, Moderator]
Reason: Added green tick [RoryOF, Moderator]
LibreOffice 6.0 on Linux Mint 18.3 Sylvia
Re: Transform CellAddress to cell name using Java
Get the cell object and then property AbsoluteName.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Transform CellAddress to cell name using Java
A cell object that has a CellAddress will also have an AbsoluteName like $Sheet1.$A$1. Can you use that?
By the way, when CellAddress.Column = 1, that is column B and when CellAddress.Row = 1 that is row 2
By the way, when CellAddress.Column = 1, that is column B and when CellAddress.Row = 1 that is row 2
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: Transform CellAddress to cell name using Java
Yeah, a little string manipulation, and this will do the trick. Thank you
LibreOffice 6.0 on Linux Mint 18.3 Sylvia
Re: [Solved] Transform CellAddress to cell name using Java
Any way to do the same with ComplexReference? The straightforward way of doing something like splitting reference in two, then getting cells by their addresses, then getting AbsoluteName of each of them, THEN handcrafting `A1:A3` string with `.split()`s and `.removeAll()`s seems cumbersome to say the least
LibreOffice 6.0 on Linux Mint 18.3 Sylvia
Re: [Solved] Transform CellAddress to cell name using Java
You have to install the MRI extension.
AbsoluteName is a property of a cell range.
AbsoluteName is a property of a cell range.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice