Select to view content in your preferred language

Error exporting table to Excel format from ArcGIS Pro 2.6

4463
6
Jump to solution
08-26-2020 06:48 AM
josuedi
Regular Contributor

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!

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

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.  


... sort of retired...

View solution in original post

6 Replies
Robert_LeClair
Esri Notable Contributor

Josue - question.  Have you installed the Microsoft Access Database Engine driver to work with Excel files in AGP?  You may learn more here.

0 Kudos
josuedi
Regular Contributor

Hi Robert.

Yes, i have installed Microsoft Accedd Database Engine.

josuedi
Regular Contributor

The Problem is only with .xlsx format, because when i will go export in .xls format (65,000) records, the export is successful.

0 Kudos
DanPatterson
MVP Esteemed Contributor

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.  


... sort of retired...
josuedi
Regular Contributor

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,

0 Kudos
DanPatterson
MVP Esteemed Contributor

Glad it worked out.


... sort of retired...