Files
StorefrontUtility/WriteReport.py

32 lines
903 B
Python

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 = []