While the ArcToolbox Conversion tool 'Grid to ASCII' produces an ASCII file that stores the z-values of each cell of a grid, there is no x and y coordinate for the center of each cell. Intstructions provided produce a text file that contains the x coordinate, the y coordinate, and the z-value of the center of every cell in a grid. Spatial Analyst is required to perform this operation.
outfile.txt = SAMPLE([ingrid],[ingrid])
The format of the output text file may have to be modified to be compatible with specific needs. The first and last columns in the text file are the z-values.
ESRI does not provide the VBA code for the above procedure. The necessary code must be developed by the user.
Get help from ArcGIS experts
Download the Esri Support App