Read the spreadsheet data sent from the front end. This allows pandas to see it as a file type object.
Fixed bug where column_count wouldn't get set if there isn't an Annotation column
This commit is contained in:
parent
e2b70da6b7
commit
93e8015ddd
|
@ -453,7 +453,7 @@ class FileService(object):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
df = pd.read_excel(io.BytesIO(ss_data), header=None)
|
df = pd.read_excel(io.BytesIO(ss_data.read()), header=None)
|
||||||
|
|
||||||
root = etree.Element("definitions",
|
root = etree.Element("definitions",
|
||||||
xmlns="http://www.omg.org/spec/DMN/20151101/dmn.xsd",
|
xmlns="http://www.omg.org/spec/DMN/20151101/dmn.xsd",
|
||||||
|
@ -491,11 +491,11 @@ class FileService(object):
|
||||||
label=label, name=name, typeRef=type_ref))
|
label=label, name=name, typeRef=type_ref))
|
||||||
output_count += 1
|
output_count += 1
|
||||||
elif item == 'Annotation':
|
elif item == 'Annotation':
|
||||||
column_count = count
|
|
||||||
break
|
break
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
row = 6
|
row = 6
|
||||||
|
column_count = count
|
||||||
while row < df.shape[0]:
|
while row < df.shape[0]:
|
||||||
column = 1
|
column = 1
|
||||||
row_values = df.iloc[row].values[1:column_count]
|
row_values = df.iloc[row].values[1:column_count]
|
||||||
|
|
Loading…
Reference in New Issue