vb.net arcobjects get several column values in a exported dbf file

1496
2
Jump to solution
09-22-2014 07:23 PM
Highlighted
by
New Contributor III

Dear all,

I use the following steps to create a dbf table:

(1) use geoprocessing tool to generate an intersect layer based on 2 layers.

(2) export the intersect layer into a dbf table.

(3) import the dbf file into arcmap.

(4) open the dbf table in arcmap.

based on the dbf table, I want to retrieve several column values from the dbf table:


I am using vb.net and want to save the partial result into excel file. Anybody has any advice? thanks in advance.

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
New Contributor II

You can simply use ODBC connection in VB.Net to fill a Datatable then save the datatable and specific column to Excel file. If you want to use ArcObjects,

Create a ShapefileWorkspaceFactory open it and use the workspace to open the DBF file as ITable then loop through each record and write the data for the fields that you are interested in to a CSV file directly or to a Datatable and use the datatable to save to Excel.

View solution in original post

2 Replies
Highlighted
New Contributor II

You can simply use ODBC connection in VB.Net to fill a Datatable then save the datatable and specific column to Excel file. If you want to use ArcObjects,

Create a ShapefileWorkspaceFactory open it and use the workspace to open the DBF file as ITable then loop through each record and write the data for the fields that you are interested in to a CSV file directly or to a Datatable and use the datatable to save to Excel.

View solution in original post

Highlighted
by
New Contributor III

Hi Ravishankar,

Thank you very much for the reply. I will follow the arcobjects steps. If any problem, will update you.

Reply
0 Kudos