How can I iterate through cells in range in Python macro

Hi All. Can’t understand how to iterate ranges in Calc with Python. For example the code

source_range = doc.Sheets[sheet_name]["A1:C8"]
for cell in source_range:
    print(cell.getString())

does’t work. Please can you recommend a good help for methods and properties in order not to ask newb questions)

source_range = doc.Sheets[sheet_name]["A1:C8"]
data = source_range.DataArray
print(data)
for row in data:
    for cell in row:
        print(cell)
1 Like
2 Likes