<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Exporting .geodatabase dataset to Excel or CSV format in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/exporting-geodatabase-dataset-to-excel-or-csv/m-p/332945#M2192</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Eric for showing interest, and for your prompt input!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, I am not a developer, and I think it will take me a lot of time to complete all the steps you outlined in your post. It will be highly appreciated if you share your code, so I can use it and I am sure that it will be a helpful resource for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again, thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 May 2015 19:33:08 GMT</pubDate>
    <dc:creator>HaniDraidi</dc:creator>
    <dc:date>2015-05-11T19:33:08Z</dc:date>
    <item>
      <title>Exporting .geodatabase dataset to Excel or CSV format</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/exporting-geodatabase-dataset-to-excel-or-csv/m-p/332943#M2190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="text-align: justify;"&gt;Is there a way to export a .geodatabase dataset to Excel or CSV file by android mobile application?&lt;/P&gt;&lt;P&gt;For example, I want to have a button in my app that exports a .geodatabase dataset stored locally on my device to Excel or CSV file and save it on the device.&lt;/P&gt;&lt;P&gt;If this possible, how can I do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated!&lt;/P&gt;&lt;P&gt;Hani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 19:55:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/exporting-geodatabase-dataset-to-excel-or-csv/m-p/332943#M2190</guid>
      <dc:creator>HaniDraidi</dc:creator>
      <dc:date>2015-04-28T19:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting .geodatabase dataset to Excel or CSV format</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/exporting-geodatabase-dataset-to-excel-or-csv/m-p/332944#M2191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very interesting. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So there is no API in the product that does this, at least not at this time.&lt;/P&gt;&lt;P&gt;However, there are APIs to access the necessary geodatabase fields and values that you can take advantage of to accomplish something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, this is what I did. It worked for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Use Java code to create and open a file to write to&lt;/LI&gt;&lt;LI&gt;Access the GeodatabaseFeatureTable you wish to export&lt;/LI&gt;&lt;LI&gt;If you want the first line of your CSV file to contain the field names, get the collection of field names and write the comma-separated list of names to the file.&lt;/LI&gt;&lt;LI&gt;Next, select all the records in the table and get a FeatureSet result.&lt;/LI&gt;&lt;LI&gt;Iterate through the FeatureSet. For each Feature, call getAttributes(). This gives you access to each field value that you can write out. You can also check the field type if you want to do specific value handling, etc.&lt;/LI&gt;&lt;LI&gt;Close the file.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like that. May sound like a hack, and I would share my exact code, but it is embarrassingly hackish-looking. But it worked....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Care to share more details about the need to do such a thing? Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2015 17:19:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/exporting-geodatabase-dataset-to-excel-or-csv/m-p/332944#M2191</guid>
      <dc:creator>EricBader</dc:creator>
      <dc:date>2015-05-11T17:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting .geodatabase dataset to Excel or CSV format</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/exporting-geodatabase-dataset-to-excel-or-csv/m-p/332945#M2192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Eric for showing interest, and for your prompt input!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, I am not a developer, and I think it will take me a lot of time to complete all the steps you outlined in your post. It will be highly appreciated if you share your code, so I can use it and I am sure that it will be a helpful resource for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again, thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2015 19:33:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/exporting-geodatabase-dataset-to-excel-or-csv/m-p/332945#M2192</guid>
      <dc:creator>HaniDraidi</dc:creator>
      <dc:date>2015-05-11T19:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting .geodatabase dataset to Excel or CSV format</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/exporting-geodatabase-dataset-to-excel-or-csv/m-p/332946#M2193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will share it as soon as I can clean things up....stay tuned!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 21:11:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/exporting-geodatabase-dataset-to-excel-or-csv/m-p/332946#M2193</guid>
      <dc:creator>EricBader</dc:creator>
      <dc:date>2015-05-14T21:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting .geodatabase dataset to Excel or CSV format</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/exporting-geodatabase-dataset-to-excel-or-csv/m-p/332947#M2194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric-&lt;/P&gt;&lt;P&gt;Still staying tuned...&amp;nbsp; did you get the code written for this?&amp;nbsp; I'm about to write the same code, myself.&amp;nbsp; Would be great to not have to reinvent the wheel...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Melo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2015 14:39:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/exporting-geodatabase-dataset-to-excel-or-csv/m-p/332947#M2194</guid>
      <dc:creator>melodiking</dc:creator>
      <dc:date>2015-11-30T14:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting .geodatabase dataset to Excel or CSV format</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/exporting-geodatabase-dataset-to-excel-or-csv/m-p/332948#M2195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah! Caught me. I will try to do this asap. I'm sorry for letting this get away!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2015 01:05:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/exporting-geodatabase-dataset-to-excel-or-csv/m-p/332948#M2195</guid>
      <dc:creator>EricBader</dc:creator>
      <dc:date>2015-12-02T01:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting .geodatabase dataset to Excel or CSV format</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/exporting-geodatabase-dataset-to-excel-or-csv/m-p/332949#M2196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;It could go something like this. See attached. It's a Java program, but the flow will be similar. Pardon my hacks. &lt;/SPAN&gt;&lt;SPAN class="emoticon_silly emoticon-inline" style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2015 15:53:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/exporting-geodatabase-dataset-to-excel-or-csv/m-p/332949#M2196</guid>
      <dc:creator>EricBader</dc:creator>
      <dc:date>2015-12-02T15:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting .geodatabase dataset to Excel or CSV format</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/exporting-geodatabase-dataset-to-excel-or-csv/m-p/332950#M2197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&amp;nbsp; Code was perfect.&amp;nbsp; I adapted it slightly to add Latitude and Longitude fields.&amp;nbsp; I also adapt the date field from epoch to a readable format. So I thought I'd share that code here in case it is useful to anyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="s1"&gt;PrintWriter&lt;/SPAN&gt; writer&amp;nbsp; = &lt;SPAN class="s2"&gt;&lt;STRONG&gt;new &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;PrintWriter&lt;/SPAN&gt;(&lt;SPAN class="s3"&gt;&lt;STRONG&gt;file&lt;/STRONG&gt;&lt;/SPAN&gt;.getAbsolutePath(), &lt;SPAN class="s4"&gt;&lt;STRONG&gt;"WINDOWS-1252"&lt;/STRONG&gt;&lt;/SPAN&gt;);
writer.write(&lt;SPAN class="s4"&gt;&lt;STRONG&gt;"Longitude" &lt;/STRONG&gt;&lt;/SPAN&gt;+ &lt;SPAN class="s4"&gt;&lt;STRONG&gt;","&lt;/STRONG&gt;&lt;/SPAN&gt;);
writer.write(&lt;SPAN class="s4"&gt;&lt;STRONG&gt;"Latitude" &lt;/STRONG&gt;&lt;/SPAN&gt;+ &lt;SPAN class="s4"&gt;&lt;STRONG&gt;","&lt;/STRONG&gt;&lt;/SPAN&gt;);
&lt;SPAN class="s2"&gt;&lt;STRONG&gt;for&lt;/STRONG&gt;&lt;/SPAN&gt;(com.esri.core.map.Field field: obsTable.getFields()){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writer.write(field.getName() + &lt;SPAN class="s4"&gt;&lt;STRONG&gt;","&lt;/STRONG&gt;&lt;/SPAN&gt;);
}


Iterator&amp;lt;Object&amp;gt; it = objs.iterator();
&lt;SPAN class="s2"&gt;&lt;STRONG&gt;while&lt;/STRONG&gt;&lt;/SPAN&gt;(it.hasNext()){

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GeodatabaseFeature feature = (GeodatabaseFeature)it.next();

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Point point = (Point) GeometryEngine.&lt;EM&gt;project&lt;/EM&gt;(feature.getGeometry(), SpatialReference.&lt;EM&gt;create&lt;/EM&gt;(&lt;SPAN class="s5"&gt;102113&lt;/SPAN&gt;), SpatialReference.&lt;EM&gt;create&lt;/EM&gt;(&lt;SPAN class="s5"&gt;4326&lt;/SPAN&gt;));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StringBuffer values = &lt;SPAN class="s2"&gt;&lt;STRONG&gt;new &lt;/STRONG&gt;&lt;/SPAN&gt;StringBuffer();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.append(point.getX() + &lt;SPAN class="s4"&gt;&lt;STRONG&gt;","&lt;/STRONG&gt;&lt;/SPAN&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.append(point.getY() + &lt;SPAN class="s4"&gt;&lt;STRONG&gt;","&lt;/STRONG&gt;&lt;/SPAN&gt;);


&lt;SPAN class="s2"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for&lt;/STRONG&gt;&lt;/SPAN&gt;(com.esri.core.map.Field f : objs.getFields()){
&lt;SPAN class="s2"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/STRONG&gt;&lt;/SPAN&gt;(f.getName().equals(&lt;SPAN class="s4"&gt;&lt;STRONG&gt;"Date"&lt;/STRONG&gt;&lt;/SPAN&gt;)){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.append(epochTimeConvert(Long.&lt;EM&gt;parseLong&lt;/EM&gt;(feature.getAttributeValue(f).toString()), &lt;SPAN class="s4"&gt;&lt;STRONG&gt;"EEE MMM dd, yyyy hh:mm a"&lt;/STRONG&gt;&lt;/SPAN&gt;) + &lt;SPAN class="s4"&gt;&lt;STRONG&gt;","&lt;/STRONG&gt;&lt;/SPAN&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&lt;SPAN class="s2"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/STRONG&gt;&lt;/SPAN&gt;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.append(feature.getAttributeValue(f) + &lt;SPAN class="s4"&gt;&lt;STRONG&gt;","&lt;/STRONG&gt;&lt;/SPAN&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writer.println(values);
}
writer.close();&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:46:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/exporting-geodatabase-dataset-to-excel-or-csv/m-p/332950#M2197</guid>
      <dc:creator>melodiking</dc:creator>
      <dc:date>2021-12-11T15:46:13Z</dc:date>
    </item>
  </channel>
</rss>

