<?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 FeatureDataGrid Excel Export in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-excel-export/m-p/599941#M15381</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was looking for an example/sample code showing how to export the information from FeatureDataGrid to an Excel file.&amp;nbsp; I came across this post, which has a link to another post that shows how to export the DataGrid to an Excel but it doesn't seem to work for a FeatureDataGrid&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/13460-Export-to-Excel...?p=79906#post79906"&gt;http://forums.arcgis.com/threads/13460-Export-to-Excel...?p=79906#post79906&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was wondering if anyone has accomplished this and would like to help me out and maybe share some code or had any ideas / research tips and information .&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;David&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Feb 2011 16:40:59 GMT</pubDate>
    <dc:creator>DavidAshton</dc:creator>
    <dc:date>2011-02-25T16:40:59Z</dc:date>
    <item>
      <title>FeatureDataGrid Excel Export</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-excel-export/m-p/599941#M15381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was looking for an example/sample code showing how to export the information from FeatureDataGrid to an Excel file.&amp;nbsp; I came across this post, which has a link to another post that shows how to export the DataGrid to an Excel but it doesn't seem to work for a FeatureDataGrid&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/13460-Export-to-Excel...?p=79906#post79906"&gt;http://forums.arcgis.com/threads/13460-Export-to-Excel...?p=79906#post79906&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was wondering if anyone has accomplished this and would like to help me out and maybe share some code or had any ideas / research tips and information .&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;David&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 16:40:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-excel-export/m-p/599941#M15381</guid>
      <dc:creator>DavidAshton</dc:creator>
      <dc:date>2011-02-25T16:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Excel Export</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-excel-export/m-p/599942#M15382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi David,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess, I never took the time to revisit the thead you referred to. Guilty!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am attaching a solution file, with a very simplified Export to excel, using the FeatureDataGrid sample from the Gallery. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It covers exporting all the features in the grid (FeatureLayer), the selected graphics, and exporting all the graphics but only a few of the attributes with their aliases. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please, don't be confused by the name of the solution, I just used an old project to test the export to Excel. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please, fix the ESRI assembly references. I had to remove them from the bin, because the zip was too big. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a line of code in App.xaml.cs, which you should include in your project if you don't want your app to crash if user tries to save over an open Excel file. And you can find your own solution for this, if you don't like mine (I don't like it either, but I am solving problems one by one, so some have to wait. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if something is not working for you. Hope, we will be able to resolve it. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Darina&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Feb 2011 14:20:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-excel-export/m-p/599942#M15382</guid>
      <dc:creator>DarinaTchountcheva</dc:creator>
      <dc:date>2011-02-28T14:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Excel Export</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-excel-export/m-p/599943#M15383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi! I use your code and i have erro:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please can you help me !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 14:17:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-excel-export/m-p/599943#M15383</guid>
      <dc:creator>EricCreahi</dc:creator>
      <dc:date>2013-04-15T14:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Excel Export</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-excel-export/m-p/599944#M15384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi! I use your code and i have erro:&lt;BR /&gt;&lt;BR /&gt;Please can you help me !&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess you should check that your attribute is set:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var key = field.Header.ToString();
if (data.Attributes.ContainsKey(key))
&amp;nbsp;&amp;nbsp;&amp;nbsp; strValue = data.Attributes[key].ToString();&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:44:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-excel-export/m-p/599944#M15384</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2021-12-12T01:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Excel Export</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-excel-export/m-p/599945#M15385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi thanks for your reponse.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But it is the same problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i use this FeatureLayer :&lt;/SPAN&gt;&lt;A rel="nofollow"&gt;Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/Since_1970/MapServer/0"&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can export the first attribut :OBJECTID (Type: esriFieldTypeOID, Alias: Object Id) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But the other one has the same problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And i use your last code nothing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please help me &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Apr 2013 09:02:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-excel-export/m-p/599945#M15385</guid>
      <dc:creator>EricCreahi</dc:creator>
      <dc:date>2013-04-16T09:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Excel Export</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-excel-export/m-p/599946#M15386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;May be we have some &lt;/SPAN&gt;&lt;STRONG&gt;Null&lt;/STRONG&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Apr 2013 09:18:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-excel-export/m-p/599946#M15386</guid>
      <dc:creator>EricCreahi</dc:creator>
      <dc:date>2013-04-16T09:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Excel Export</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-excel-export/m-p/599947#M15387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;okay, I found the mistake.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
 &amp;lt;esri:FeatureDataGrid.Columns&amp;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;lt;sdk:DataGridTextColumn Binding="{Binding OBJECTID}" Header="OBJECTID"/&amp;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;lt;sdk:DataGridTextColumn Binding="{Binding Tsu}"&amp;nbsp; Header="Tsu"/&amp;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;lt;sdk:DataGridTextColumn Binding="{Binding Magnitude}" Header="Magnitude"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:FeatureDataGrid.Columns&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;we have space in the&lt;/SPAN&gt;&lt;STRONG&gt; header&lt;/STRONG&gt;&lt;SPAN&gt;, For instance: Header="OBJECTID Hello" .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the good one is Header="OBJECTIDHello" without&amp;nbsp; space.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:44:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-excel-export/m-p/599947#M15387</guid>
      <dc:creator>EricCreahi</dc:creator>
      <dc:date>2021-12-12T01:44:23Z</dc:date>
    </item>
  </channel>
</rss>

