473,241 Members | 1,662 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,241 software developers and data experts.

Export ArcMap tables to csv

I'm brand new to python and somewhat familiar with ArcMap. I have a functioning script that produces a table using ZonalStaticticsAsTable_sa. I'm wondering how I can export that table using python to a csv so that it can be opened in excel. To do this manually with ArcMap or ArcCatalog would take way too long with the number of files. Any help would be greatly appreciated! I'm using Arc version 9.2 and Python version 2.4.1
Jul 18 '07 #1
3 5560
bvdet
2,851 Expert Mod 2GB
I'm brand new to python and somewhat familiar with ArcMap. I have a functioning script that produces a table using ZonalStaticticsAsTable_sa. I'm wondering how I can export that table using python to a csv so that it can be opened in excel. To do this manually with ArcMap or ArcCatalog would take way too long with the number of files. Any help would be greatly appreciated! I'm using Arc version 9.2 and Python version 2.4.1
Is this table stored in memory or an ascii text file? Can you show us what the data looks like?
Jul 18 '07 #2
Is this table stored in memory or an ascii text file? Can you show us what the data looks like?
When I go to the folder where the tables are saved, there is only an info folder. Within that folder, there are three files for each table: .dat, .nit and .xml. To view the tables, I must either go into ArcMap or ArcCatalog.

Here is the xml from one of the tables:

<?xml version="1.0" ?>
- <!-- <!DOCTYPE metadata SYSTEM "http://www.esri.com/metadata/esriprof80.dtd">
-->
- <metadata xml:lang="en">
- <Esri>
<MetaID>{00D5ABFD-2FB3-466B-91FE-AD4736D74A4F}</MetaID>
<CreaDate>20070709</CreaDate>
<CreaTime>12240200</CreaTime>
<SyncOnce>TRUE</SyncOnce>
- <DataProperties>
- <lineage>
<Process Name="ZonalStatisticsAsTable_2" ToolSource="C:\Program Files\ArcGIS\ArcToolbox\Toolboxes\Spatial Analyst Tools.tbx\ZonalStatisticsAsTable" Date="20070709" Time="122402">ZonalStatisticsAsTable basin_plygn Name cp193010pre E:\drainage_basins\tables\193010bas DATA</Process>
</lineage>
</DataProperties>
</Esri>
</metadata>

I don't know if I answered your question. Thanks for the help.
Jul 18 '07 #3
bvdet
2,851 Expert Mod 2GB
When I go to the folder where the tables are saved, there is only an info folder. Within that folder, there are three files for each table: .dat, .nit and .xml. To view the tables, I must either go into ArcMap or ArcCatalog.

Here is the xml from one of the tables:

<?xml version="1.0" ?>
- <!-- <!DOCTYPE metadata SYSTEM "http://www.esri.com/metadata/esriprof80.dtd">
-->
- <metadata xml:lang="en">
- <Esri>
<MetaID>{00D5ABFD-2FB3-466B-91FE-AD4736D74A4F}</MetaID>
<CreaDate>20070709</CreaDate>
<CreaTime>12240200</CreaTime>
<SyncOnce>TRUE</SyncOnce>
- <DataProperties>
- <lineage>
<Process Name="ZonalStatisticsAsTable_2" ToolSource="C:\Program Files\ArcGIS\ArcToolbox\Toolboxes\Spatial Analyst Tools.tbx\ZonalStatisticsAsTable" Date="20070709" Time="122402">ZonalStatisticsAsTable basin_plygn Name cp193010pre E:\drainage_basins\tables\193010bas DATA</Process>
</lineage>
</DataProperties>
</Esri>
</metadata>

I don't know if I answered your question. Thanks for the help.
That answered my question, but unfortunately I cannot help because I am unfamiliar with ArcMap. Do you have a way of printing the tables? Could you print them to a text file?
Jul 18 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: syed_saqib_ali | last post by:
Hi..... I have an Instance of ArcMap 9.0 running. I also have a shapefile named myShape (actually corresponding to 4 files on the disk: myShape.dbf, myShape.shp, myShape.pnt and...
3
by: Bennett Haselton | last post by:
I'm working on an ASP.Net project where I want to test code on a local machine using a local database as a back-end, and then export it to the production machine where it uses the hosting...
0
by: Shawn Mehaffie | last post by:
I have the following class that I've wirtten to take a Dataset and automatically export it to either XML, ASCII or Tab delimited file. The reason I wrote it they way I did was that I don't want to...
0
by: Shawn Mehaffie | last post by:
I have the following class that I've wirtten to take a Dataset and automatically export it to either XML, ASCII or Tab delimited file. The reason I wrote it they way I did was that I don't want to...
3
by: PSD | last post by:
I am trying to link an access database directly to individual polygons or points (PGDB) in Arcmap, that is when opened the Access link would open Archmap and then zoom to the polygons or points...
0
by: tone | last post by:
i'm a recent blow in to this world of access and am having a ball, i created a database linked to an arcmap mxd, all cool going from mxd to access forms based on site id. what i want to do is...
1
by: smaczylo | last post by:
Hello, I've recently been asked to work with Microsoft Access, and while I feel quite comfortable with Excel, I'm at a complete loss with databases. If someone could help me with this issue I'm...
4
by: Kimutaimz | last post by:
I am trying to link an access database directly to individual polygons or points (PGDB) in Arcmap, that is when opened the Access link would open Archmap and then zoom to the polygons or points...
2
hemantbasva
by: hemantbasva | last post by:
Note We need to have a template on server for generating report in multiple sheet as we do not had msoffice on server moreover this require a batch job to delete excel file created by the...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.