Broke report appending into a separate function/file. Started working on Column Format Checking Function

This commit is contained in:
Dan Dembinski
2019-06-24 16:48:40 -04:00
parent a62958d94a
commit b8e5ae6baa
3 changed files with 149 additions and 35 deletions

31
WriteReport.py Normal file
View File

@@ -0,0 +1,31 @@
def Write_Report(y, ws, columnFormat, SSheader):
results = []
count = 0
for child in y.report:
for childs in child:
print(columnFormat[SSheader[count]])
count = count + 1
if '$' in childs.text:
convert = childs.text
apply = convert[1:]
results.append(float(apply.replace(',', '')))
else:
results.append(childs.text)
ws.append(results)
results = []
count = 0
def Detail_Write_Report(y, ws):
results = []
for child in y.report:
for childs in child:
if '$' in childs.text:
convert = childs.text
apply = convert[1:]
results.append(float(apply.replace(',', '')))
else:
results.append(childs.text)
ws.append(results)
results = []