0
Ich möchte die erste Zeile meiner Excel-Datei in Kleinbuchstaben konvertieren. Wie es es tun:Python win32com konvertieren erste Zeile in Kleinbuchstaben
import win32com.client
excel = win32com.client.Dispatch("Excel.Application")
excel.DisplayAlerts = False
excel.Visible=False
for i in files:
doc = excel.Workbooks.Open(filepath+'/'+str(i))
ws = doc.Worksheets(str(i).split(".")[0])
ws.Rows(1).Cells.Value=lower(ws.Rows(1).Cells.Value) #This syntax is wrong
ws.Rows(1).Replace("_","")
ws.Rows(1).Replace(" ","")
doc.Save()
doc.Close()
ws.Replace()
Versuchen: 'ws.Rows (1) .Cells.Value = ws.Rows (1) .Cells.Value.lower()' –
Ich bekomme AttributeError: 'tuple' Objekt hat kein Attribut 'lower' @tmadam –