Commit 31f6e07f authored by mouadh's avatar mouadh

xmlwitch

parent 8ea06bc8
...@@ -296,7 +296,6 @@ class XmlaExecuteTools(): ...@@ -296,7 +296,6 @@ class XmlaExecuteTools():
:param mdx_execution_result: mdx_execute() result :param mdx_execution_result: mdx_execute() result
:return: CellData as string :return: CellData as string
""" """
columns_loop = []
if ((len(mdx_execution_result['columns_desc']['columns'].keys()) == 0) if ((len(mdx_execution_result['columns_desc']['columns'].keys()) == 0)
^ ^
...@@ -320,18 +319,16 @@ class XmlaExecuteTools(): ...@@ -320,18 +319,16 @@ class XmlaExecuteTools():
index=False) index=False)
]) ])
cell_data = "" xml = xmlwitch.Builder()
index = 0 index = 0
for value in columns_loop: for value in columns_loop:
if np.isnan(value): if np.isnan(value):
value = '' value = ''
cell_data += """ with xml.Cell(CellOrdinal=str(index)):
<Cell CellOrdinal="{0}"> xml.Value(str(value),**{'xsi:type': 'xsi:long'})
<Value xsi:type="xsi:long">{1}</Value>
</Cell>
""".format(index, value)
index += 1 index += 1
return cell_data return str(xml)
def generate_axes_info_slicer(self, mdx_execution_result): def generate_axes_info_slicer(self, mdx_execution_result):
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment