Does anyone know of code to add a table via python coding. I am creating a script to run within ArcMap that will create then add a table to the document?
You can add a table using the Create Table function in python from ArcGIS Desktop or Pro.
Create Table— ArcGIS Desktop
Create Table—ArcGIS Pro
Fields can be added to the table using Add Field function in python from Desktop or Pro
Add Field—ArcGIS Desktop
Add Field—ArcGIS Pro
To add rows of data you can use an InsertCursor in python from Desktop or Pro
You can also add a table from other sources such as XLS, XLSX, CSV, TXT, DBF, etc. using Table to Table conversion from both Desktop and Pro
Table To Table—ArcGIS Desktop
Table To Table—ArcGIS Pro
Lance Cole, your InsertCursor for ArcGIS Desktop is to the older/legacy cursors. I suggest you send people to the DA cursors: InsertCursor—Help | ArcGIS Desktop
Joshua, Thanks, missed that when I was searching and pasting the links last night.
Retrieving data ...