Hello,
Corrupt File: XML parse failure - cell has no column definition (ToolId: 98)
I am getting this error in my workflow for xlsx file.
Workaround : As per Alteryx, just open and save. So this error would be avoided.
My condition : I have written a python code to Copy, open and save this file to a destination path and then read the file for further process as a Macro
from ayx import Alteryx
from pathlib import Path
import shutil
#import openpyxl
import xlwings as xw
df=Alteryx.read('#1')
df['Status']=""
length = len(df)
for i in range(length):
src=Path(df['Source Full Path'][i])
dst=Path(df['Destination Full Path'][i])
save=df['Save'][i]
#print(dst)
#print(src)
try:
shutil.copy2(src,dst)
if save=='YES':
app=xw.App(visible=False)
book=app.books.open(dst)
#wBook=openpyxl.load_workbook(dst)
#wSheet = wBook.worksheets[0]
#wSheet.column_dimensions['A'].hidden = True
#wSheet.column_dimensions['A'].hidden = False
#wBook.calculation.calcMode = 'auto'
#wBook.save(dst)
#wBook.close(dst)
book.sheets[0]['AAA1'].value = 'xlwings'
book.sheets[0]['AAA1'].value = ''
book.save()
book.close()
app.quit()
df['Status'][i]='Success'
except:
df['Status'][i]="Fails"
md = Alteryx.readMetadata('#1')
md['new_column'] = {
'name': 'Status',
'type': 'String',
'length': (15,)
}
#################################
# write out the data with the original metadata
Alteryx.write(df, 1, md)
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |