필자는 LibreOffice.calc에 액세스하고, 파일을 열고, 내 시트와 getValue() 및 getFormula()를 선택했습니다. 즉, 내 직업은 (거의) 완료되었지만 PyUno 브리지는 다리와 매우 Pythonic하지 않습니다.PyUno Bridge 객체 모델이 있습니까?
예를 들어, for sheet in sheets:
는 다음과 같은 예외가 발생합니다 : TypeError: 'pyuno' object is not iterable
그래서, 질문은 만약 누군가가, 어딘가에있는 LibreOffice와 (CALC) 개체 모델에 오픈 소스 파이썬 라이브러리?
off = LibreOffice()
calc = off.Open(file)
sheets = calc.getSheets()
for sheet in sheets:
print(sheet.name)
rng = sheet.Range("A1:C5")
...
내 코드를 다시 방문이 작동하는지 볼 수 있습니다 ... –