Inadmissible value or data type. Index out of defined range.

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
jarkky
Posts: 14
Joined: Sat Oct 12, 2019 5:18 pm

Inadmissible value or data type. Index out of defined range.

Post by jarkky »

error_range2
error_range2
Screenshot from 2021-06-11 14-19-13.png (9.74 KiB) Viewed 3511 times
I get this message if I try to write cells beyond AMJ, for example AMK1...
Can I increase the 'defined range' to larger somehow?

Below is ok:
Sheet.Columns(1023).width=500
Then fail:
Sheet.Columns(1024).width=500
error_range
error_range
Below is ok:
Sheet.getCellRangeByName("A7:AMJ9").clearContents(Flags)
Then fail:
Sheet.getCellRangeByName("A7:AMK9").clearContents(Flags)

--
Jari
OpenOffice 3.1 on CentOS Linux release 8.0.1905 (Core)
User avatar
robleyd
Moderator
Posts: 5056
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Inadmissible value or data type. Index out of defined ra

Post by robleyd »

Calc only has 1024 columns; A to AMJ
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.1.2; SlackBuild for 24.2.1 by Eric Hameleers
User avatar
keme
Volunteer
Posts: 3699
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Inadmissible value or data type. Index out of defined ra

Post by keme »

LibreOffice Calc offers the extended grid (matching Excel's space provision) as an experimental feature, if I'm not terribly mistaken. LibreOffice is built on the same foundation as OpenOffice, so you will easily find your way around it.

"Experimental" means that you need to enable it in some settings dialog, and it may not be available in the "still" (more thoroughly tested, or "previous") version, I dont know. Posting from my phone, so I can't test it right now, nor give you the exact path to the setting.

If you explain your reason for needing all those columns, someone may be able to suggest a better approach. That is a lot of columns. Certainly, there are cases when utilizing all those columns is the sensible choice, but more often than not there is a better way.
Post Reply