Page 1 of 1

Maximum Number of Characters for a Text Cell?

Posted: Wed Jul 27, 2011 1:35 pm
by mce
Hi,

Does anyone know what is the maximum number of characters for a text cell in TM1?
I really appreciate quick responses.

Regards,

Re: Maximum Number of Characters for a Text Cell?

Posted: Wed Jul 27, 2011 1:40 pm
by qml
It's 65k characters per cell if I remember correctly, but there are other limitations too:
- TI will only handle 8k,
- Excel will handle less, depending on the version,
- Cube Viewer will not display all characters (there is a limit on column width).

Was that fast enough (faster than searching the forum)?

Re: Maximum Number of Characters for a Text Cell?

Posted: Wed Jul 27, 2011 2:05 pm
by mce
Many thanks. I found the info about the limitations around 8k for TI, but could not find the ones about 64K per cell.

Re: Maximum Number of Characters for a Text Cell?

Posted: Wed Jun 13, 2012 11:23 am
by MartinBrandl
From the TM1-API:
TM1_STRING A character string whose length does not exceed 64K bytes.
Since you can pass a TM1_String into the write function TM1CubeCellValueSet, I suppose that the maximum number of characters is
64.000 for ANSI and 32.000 (64K / 2 Bytes) for Unicode (UTF16).

Re: Maximum Number of Characters for a Text Cell?

Posted: Wed Jun 13, 2012 1:17 pm
by Duncan P
In 9.5.2 if you are using TI the limit is a bit higher.

I have the following code :-

Code: Select all

write_len = CellGetN('string len test', 'value', 'write length');
write_string = FILL( '*', write_len );
CellPutS( write_string, 'string len test', 'value', 'string' );
read_string = CellGetS( 'string len test', 'value', 'string' );
read_len = LONG( read_string );
CellPutN( read_len, 'string len test', 'value', 'read length' );
which reads a number from a cell, creates a string of that length and puts it in a text cell, reads from the cell and puts the length of the read string in a second numeric cell.

It handles anything up to and including 1500000 ok, but when you try it with 1600000 it fails. I don't know whether this is on the FILL the CellPutS or the CellGetS.