Hello everyone!
I am trying to export a table from ArcGIS Pro 2.6 to Excel (xlsx) format, I have excel 2013. The table contains 86,775 records, but when I try to export this data in the end it gives me an error that is described below. I would appreciate your support.
I have tried to resolve the error in the following way.
1. I have exported the table to another geodatabase again.
2. I have checked that the fields have the proper format.
Traceback (most recent call last):
File "C:\Program Files\ArcGIS\Pro\Resources\ArcToolBox\Scripts\TableToExcel.py", line 317, in <module>
arcpy.GetParameter(3))
File "C:\Program Files\ArcGIS\Pro\Resources\ArcToolBox\Scripts\TableToExcel.py", line 226, in table_to_excel
worksheet.append(rowUpdated)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\openpyxl\worksheet\_write_only.py", line 119, in append
self._rows.send(row)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\openpyxl\worksheet\_write_only.py", line 71, in _write_rows
self._writer.write_row(xf, row, row_idx)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\openpyxl\worksheet\_writer.py", line 136, in write_row
for cell in row:
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\openpyxl\worksheet\_write_only.py", line 132, in _values_to_row
cell.value = value
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\openpyxl\cell\cell.py", line 216, in value
self._bind_value(value)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\openpyxl\cell\cell.py", line 192, in _bind_value
value = self.check_string(value)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\openpyxl\cell\cell.py", line 159, in check_string
raise IllegalCharacterError
openpyxl.utils.exceptions.IllegalCharacterError
Failed to execute (TableToExcel).
Thanks!
Solved! Go to Solution.
Do you have anything other than plain text or numbers in your table?
There is something with the conversion process that isn't liked (based on the last few lines of errors).
I am sure you have gone through this in detail
Work with Microsoft Excel files in ArcGIS Pro—ArcGIS Pro | Documentation
But you might also want to try to export to a *.csv using
Table To Table (Conversion)—ArcGIS Pro | Documentation
Then bring that into Excel, just in case the converter (python package) that esri is using has a 'glitch' or some other issue.
Josue - question. Have you installed the Microsoft Access Database Engine driver to work with Excel files in AGP? You may learn more here.
Hi Robert.
Yes, i have installed Microsoft Accedd Database Engine.
The Problem is only with .xlsx format, because when i will go export in .xls format (65,000) records, the export is successful.
Do you have anything other than plain text or numbers in your table?
There is something with the conversion process that isn't liked (based on the last few lines of errors).
I am sure you have gone through this in detail
Work with Microsoft Excel files in ArcGIS Pro—ArcGIS Pro | Documentation
But you might also want to try to export to a *.csv using
Table To Table (Conversion)—ArcGIS Pro | Documentation
Then bring that into Excel, just in case the converter (python package) that esri is using has a 'glitch' or some other issue.
Hello Dan.
You're right. The problem is with the format of some fields. I removed some fields that I understood to have the problem and the problem was solved. Thank you very much for the help.
Best Regard,
Glad it worked out.