ich habe eine Frage. Ich möchte gerne Daten aus EXCEL importieren und damit rechnen, bekomme das aber irgendiwe nicht hin:
Code: Alles auswählen
# -*- coding: utf-8 -*-
import xlrd
book = xlrd.open_workbook("source.xls")
# get the first worksheet
first_sheet = book.sheet_by_index(0)
a = first_sheet.cell(5,15)
b = first_sheet.cell(6,15)
print(("a= "),(a))
print(("b= "),(b))
r=((a)+(b)
Code: Alles auswählen
runfile('C:/Users/***/Documents/2017/WinPython/temp.py', wdir='C:/Users/***/Documents/2017/WinPython')
a= number:1060.0
b= number:560.0
runfile('C:/Users/***/Documents/2017/WinPython/temp.py', wdir='C:/Users/***/Documents/2017/WinPython')
File "C:/Users/***/Documents/2017/WinPython/temp.py", line 18
r=((a)+(b)
^
SyntaxError: unexpected EOF while parsing