I’m trying to export a file using the option exportExcel and it works well most of the times but there are 2 scenarios where is throwing an error
If the file is open or if the user doesnt enter the file extension(xls)
I’m using a try catch but for an unknown reason is not catching the error
Could you let me know what I’m doing wrong?
try:
filePath = system.dataset.exportExcel(fileName, 1, NewDataSetY)
if filePath != None:
filePath = filePath.replace(' ', '%20')
filePath = filePath.replace('\\', '/')
system.net.openURL("file:" + filePath)
except Exception:
'error'
Thank you