Convert index format to string format

Is there a way to convert the index format (0,0) of a cel (excel) to a string format (A1)?
Like this node (from BB) does but the other way around. I haven’t found any other nodes that do this… Is there a workaround?
Capture152

In which format are the indexes?

excel = IN
z=[]
if isinstance(excel, list):
	for el in excel:
		z.append(el)
else:
	excel= excel

def pos_to_char(pos):
    return chr(pos + 96).upper()


for el in excel:
	char= el.split(",")

OUT= pos_to_char(int((char[0])[-1:]))+char[1][:-1]

I actually managed to create my own custom nodes after I found some old discontued node: https://dynamonodes.com/2016/01/19/numbertocharacter-az/

First convert the number to a character for the column. (this is the ‘Number to Character AZ’-node in the second image). The Code Block gives an error but it doesn’t affect the graph or results of the nodes…

Second add 1 to the row (index in revit starts at 0) and combine the row and column.

Third, the node in action:
Capture159

1 Like