<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Data Presentation Controls</title><link>http://forums.asp.net/24.aspx</link><description>ASP.NET data-bound controls such as the DataGrid, DataList, GridView, FormView, DetailsView, and Repeater Controls.  &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=23&amp;c=17" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: How can I output to Excel 2007 format</title><link>http://forums.asp.net/thread/2824598.aspx</link><pubDate>Mon, 22 Dec 2008 13:49:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2824598</guid><dc:creator>TCKarthick_accet</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2824598.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=2824598</wfw:commentRss><description>&lt;p&gt;Hi, I&amp;nbsp;am getting&amp;nbsp;an alert message&amp;nbsp;even after adding the &lt;strong&gt;ExtensionHardening&lt;/strong&gt; in the Registry. Message is &amp;quot;Excel found unreadable content in data.xlsx. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes. Can you plz help?&lt;/p&gt;</description></item><item><title>Re: How can I output to Excel 2007 format</title><link>http://forums.asp.net/thread/2678523.aspx</link><pubDate>Mon, 13 Oct 2008 07:25:46 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2678523</guid><dc:creator>chinnivasudeva</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2678523.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=2678523</wfw:commentRss><description>&lt;p&gt;Use Excel functionality (include excel.dll features) instead of using&lt;br /&gt;&lt;/p&gt;&lt;pre class="coloredcode"&gt;Response.ContentType = &lt;span class="st"&gt;&amp;quot;application/vnd.ms-excel&amp;quot;&lt;/span&gt;&lt;br /&gt;Response.AppendHeader(&lt;span class="st"&gt;&amp;quot;Content-Disposition&amp;quot;&lt;/span&gt;, &lt;span class="st"&gt;&amp;quot;filename=Data.xlsx;&amp;quot;&lt;/span&gt;)&lt;/pre&gt;&lt;pre class="coloredcode"&gt;Excel functionality will solve your problem. &lt;br /&gt;&lt;/pre&gt;&lt;pre class="coloredcode"&gt;&amp;nbsp;&lt;/pre&gt;</description></item><item><title>Re: How can I output to Excel 2007 format</title><link>http://forums.asp.net/thread/2306067.aspx</link><pubDate>Fri, 18 Apr 2008 06:50:09 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2306067</guid><dc:creator>jobejufranz</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2306067.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=2306067</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;RobertTJ:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;I found something on MSDN which refers to setting a group policy to fix this also - &lt;a href="http://support.microsoft.com/kb/948615"&gt;http://support.microsoft.com/kb/948615&lt;/a&gt;.&amp;nbsp; Being a programmer I do not know for sure, but would think this may be easier than going around to each user&amp;#39;s PC.&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Correct me if I&amp;#39;m wrong but the Group Policy you mention is only applicable if your client is connected in a Domain and you&amp;nbsp;set&amp;nbsp; a Policy in the Domain itself so that it would be applied to the client. And if your client is not connected to the Domain let&amp;#39;s say on a Workgroup Only, then you don&amp;#39;t have any choice but to edit the registry...&lt;img src="http://forums.asp.net/emoticons/emotion-4.gif" alt="Stick out tongue" /&gt;&lt;/p&gt;
&lt;p&gt;Happy coding cheers&lt;/p&gt;</description></item><item><title>Re: How can I output to Excel 2007 format</title><link>http://forums.asp.net/thread/2301560.aspx</link><pubDate>Wed, 16 Apr 2008 13:43:08 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2301560</guid><dc:creator>RobertTJ</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2301560.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=2301560</wfw:commentRss><description>&lt;p&gt;I found something on MSDN which refers to setting a group policy to fix this also - &lt;a href="http://support.microsoft.com/kb/948615"&gt;http://support.microsoft.com/kb/948615&lt;/a&gt;.&amp;nbsp; Being a programmer I do not know for sure, but would think this may be easier than going around to each user&amp;#39;s PC.&lt;/p&gt;</description></item><item><title>Re: How can I output to Excel 2007 format</title><link>http://forums.asp.net/thread/2265897.aspx</link><pubDate>Mon, 31 Mar 2008 10:21:33 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2265897</guid><dc:creator>jobejufranz</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2265897.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=2265897</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;rajverma84:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; &lt;/p&gt;
&lt;p&gt;I am facing the same problem ...&amp;nbsp;&lt;/p&gt;
&lt;p&gt;HKCU\Software\Microsoft\Office\12.0\Excel\Security\ExtensionHardening &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;under Security... ExtensionHardening was not found actually.&lt;/p&gt;
&lt;p&gt;so is there any alternative for this ...&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please reply&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;rajeev&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hi Guys,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m also facing the same problem. Based on my research on this issue, we will only encounter this if the client Excel version is 2007. Excel 2007&amp;nbsp;implements strong&amp;nbsp;XML formatting but previous version is not.&lt;/p&gt;
&lt;p&gt;Excel 2007 is having &lt;strong&gt;xlsx&lt;/strong&gt; file format while prior is &lt;strong&gt;xls&lt;/strong&gt;. 
&lt;p&gt;So far the best possible solution i&amp;#39;ve found is to set &lt;strong&gt;&amp;quot;ExtensionHardening&amp;quot;&lt;/strong&gt; double word value to &lt;strong&gt;0&lt;/strong&gt; in the registry but the biggest drawback is setting the registry of your client&amp;nbsp;1 at a time and this will take you forever to edit if you have a lot. 
&lt;p&gt;Will anyway I will teach you how to edit your registry&amp;nbsp;for those who still want to learn how to do this. Just a word of advice: Please take extra&amp;nbsp;precautions in editing the registry as it may render instability to your clients PC if you didn&amp;#39;t do it correctly. 
&lt;ol&gt;
&lt;li&gt;On the client&amp;#39;s PC, run the registry editor through Start - Run&amp;nbsp;and typing&amp;nbsp;&lt;strong&gt;regedit&lt;/strong&gt; then press Enter 
&lt;li&gt;Go to the location&amp;nbsp;&lt;strong&gt;HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\OFFICE\12.0\EXCEL\SECURITY&lt;/strong&gt; 
&lt;li&gt;On the right window, right click you mouse and choose &lt;strong&gt;New -&amp;gt; DWORD Value&lt;/strong&gt; 
&lt;li&gt;Change the name to &lt;strong&gt;“ExtensionHardening”&lt;/strong&gt;&amp;nbsp;without the double quote 
&lt;li&gt;Default value of this DWORD is actually &lt;strong&gt;0&lt;/strong&gt; which&amp;nbsp;sets the ExtensionHardening of Excel Application to be disabled&lt;/li&gt;
&lt;li&gt;Close Registry Editor&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;That&amp;#39;s all. Hope this will help others. On my side, I&amp;#39;m still stuck because not all my client&amp;#39;s are using Office 2007.&lt;/p&gt;
&lt;p&gt;Cheers.&lt;/p&gt;</description></item><item><title>Re: How can I output to Excel 2007 format</title><link>http://forums.asp.net/thread/2239199.aspx</link><pubDate>Tue, 18 Mar 2008 06:25:23 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2239199</guid><dc:creator>chayady</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2239199.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=2239199</wfw:commentRss><description>&lt;p&gt;Could it be&amp;nbsp;Ofiice 2007 bug?&lt;/p&gt;
&lt;p&gt;Check this thread&lt;/p&gt;
&lt;p&gt;&lt;a href="http://forums.asp.net/p/1070490/1560113.aspx#1560113"&gt;&lt;font color="#5403fa"&gt;http://forums.asp.net/p/1070490/1560113.aspx#1560113&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: How can I output to Excel 2007 format</title><link>http://forums.asp.net/thread/1864224.aspx</link><pubDate>Fri, 17 Aug 2007 20:15:59 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1864224</guid><dc:creator>Jackxxx</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1864224.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1864224</wfw:commentRss><description>&lt;p&gt;Sorry, still have not found any good fix.&lt;/p&gt;</description></item><item><title>Re: How can I output to Excel 2007 format</title><link>http://forums.asp.net/thread/1862825.aspx</link><pubDate>Fri, 17 Aug 2007 07:10:11 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1862825</guid><dc:creator>rajverma84</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1862825.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1862825</wfw:commentRss><description>&lt;p&gt;I am facing the same problem ...&amp;nbsp;&lt;/p&gt;
&lt;p&gt;HKCU\Software\Microsoft\Office\12.0\Excel\Security\ExtensionHardening &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;under Security... ExtensionHardening was not found actually.&lt;/p&gt;
&lt;p&gt;so is there any alternative for this ...&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please reply&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;rajeev&lt;/p&gt;</description></item><item><title>Re: How can I output to Excel 2007 format</title><link>http://forums.asp.net/thread/1677014.aspx</link><pubDate>Mon, 23 Apr 2007 03:04:49 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1677014</guid><dc:creator>Rex Lin - MSFT</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1677014.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1677014</wfw:commentRss><description>&lt;p&gt;Hi, Jack:&lt;/p&gt;
&lt;p&gt;I have one workaround you might consider. &amp;nbsp;The warning you get opening in &lt;br /&gt;Excel 2007 is controlled by a registry entry that is read just when a file &lt;br /&gt;is opened in Excel. &amp;nbsp;So you could set the entry, open the file and reset the &lt;br /&gt;registry back. &lt;br /&gt;
&lt;p&gt;HKCU\Software\Microsoft\Office\12.0\Excel\Security\ExtensionHardening &lt;br /&gt;
&lt;p&gt;Set this to 0 to bypass warning. &amp;nbsp;Set to 1 or delete to re-establish the &lt;br /&gt;warning. &lt;br /&gt;I hope the above information will be helpful. If you have any issues or concerns, please let me know. It's my pleasure to be of assistance&lt;br /&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</description></item><item><title>How can I output to Excel 2007 format</title><link>http://forums.asp.net/thread/1675990.aspx</link><pubDate>Sat, 21 Apr 2007 13:42:31 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1675990</guid><dc:creator>Jackxxx</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1675990.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1675990</wfw:commentRss><description>&lt;p&gt;I have been using this code for a while and it works great. Now with the new Excel 2007 format and extention (xlsx), when you open a file it has a message that the xls file is not in the expected format. &lt;/p&gt;
&lt;p&gt;Does anyone know how to modify this code to output to the new format? I tried just changing the extention, but no change.&lt;/p&gt;&lt;pre class=coloredcode&gt;        Response.ContentType = &lt;span class=st&gt;"application/vnd.ms-excel"&lt;/span&gt;
        &lt;span class=cmt&gt;'Excel 2000-2003 (xls)
        'Response.AppendHeader("Content-Disposition", "filename=Data.xls;")
        'Excel 2007 (xlsx)
&lt;/span&gt;        Response.AppendHeader(&lt;span class=st&gt;"Content-Disposition"&lt;/span&gt;, &lt;span class=st&gt;"filename=Data.xlsx;"&lt;/span&gt;)
        Response.Charset = &lt;span class=st&gt;""&lt;/span&gt;
        Response.Buffer = &lt;span class=kwd&gt;False
        Me&lt;/span&gt;.EnableViewState = &lt;span class=kwd&gt;False

        Dim&lt;/span&gt; tw &lt;span class=kwd&gt;As New&lt;/span&gt; System.IO.StringWriter
        &lt;span class=kwd&gt;Dim&lt;/span&gt; hw &lt;span class=kwd&gt;As New&lt;/span&gt; System.Web.UI.HtmlTextWriter(tw)

        &lt;span class=cmt&gt;' tell the grid to render itself into the html text writer 
&lt;/span&gt;        DataGrid1.RenderControl(hw)

        &lt;span class=kwd&gt;Dim&lt;/span&gt; strHtml &lt;span class=kwd&gt;As String&lt;/span&gt; = tw.ToString
        &lt;span class=kwd&gt;Dim&lt;/span&gt; iLoop &lt;span class=kwd&gt;As&lt;/span&gt; Int32
        &lt;span class=kwd&gt;Dim&lt;/span&gt; Multiple &lt;span class=kwd&gt;As&lt;/span&gt; Int32 = Fix(strHtml.Length / 1000)

        &lt;span class=cmt&gt;' now write the contents of the html string to the client 
&lt;/span&gt;        &lt;span class=kwd&gt;For&lt;/span&gt; iLoop = 0 &lt;span class=kwd&gt;To&lt;/span&gt; Multiple
            Response.Write(Mid(strHtml, (100000 * iLoop) + 1, 100000))
            Response.Flush()
        &lt;span class=kwd&gt;Next&lt;/span&gt;

        Response.&lt;span class=kwd&gt;End&lt;/span&gt;()&lt;/pre&gt;&amp;nbsp;</description></item></channel></rss>