<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>家有小虎 &#187; Excel</title>
	<atom:link href="http://jiahu.net/tag/excel/feed" rel="self" type="application/rss+xml" />
	<link>http://jiahu.net</link>
	<description>我在路上, 你不在身旁. 想你的时候, 温暖依然.</description>
	<lastBuildDate>Fri, 23 Mar 2012 04:47:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Export to Excel in SharePoint Application Page doesn&#8217;t work on second time</title>
		<link>http://jiahu.net/export-to-excel-in-sharepoint-application-page-doesnt-work-on-second-time.htm</link>
		<comments>http://jiahu.net/export-to-excel-in-sharepoint-application-page-doesnt-work-on-second-time.htm#comments</comments>
		<pubDate>Thu, 16 Jul 2009 02:49:20 +0000</pubDate>
		<dc:creator>@ouc</dc:creator>
				<category><![CDATA[工作]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://jiahu.net/?p=1069</guid>
		<description><![CDATA[The cause for this behavior is that there is a flag (named _spFormOnSubmitCalled) in SharePoint which prevents double form submition. This flag is set when the form is submitted and clear when the response is received. However when exporting the response is redirected and the page is not updated, thus the flag is not cleared <a href="http://jiahu.net/export-to-excel-in-sharepoint-application-page-doesnt-work-on-second-time.htm"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The cause for this behavior is that there is a flag (named _spFormOnSubmitCalled) in SharePoint which prevents double form submition. This flag is set when the form is submitted and clear when the response is received.</p>
<p>However when exporting the response is redirected and the page is not updated, thus the flag is not cleared and page&#8217;s postbacks are blocked.</p>
<p>In order to workaround this behavior you should manually clear the flag when exporting. This can be achieve, for example in export button&#8217;s client click function similar to the following:</p>
<blockquote><p>MyExportButton.OnClientClick = “_spFormOnSubmitCalled = false;”</p></blockquote>
<p>Setting the _spFormOnSubmitCalled to false is actually what MS Ajax is doing when an ajax request is made thus I suspect there should be not implication using such approach.</p>
<p>About  the removing  spFormOnSubmitWrapper function call, you may instead set _spSuppressFormOnSubmitWrapper variable to true, which can be done conditionally  only where needed by outputting similar to the following script:</p>
<blockquote><p>_spBodyOnLoadFunctionNames.push(“supressSubmitWraper”);<br />
function supressSubmitWraper()<br />
{<br />
_spSuppressFormOnSubmitWrapper = true;<br />
}</p></blockquote>
<p>来源: <a href="http://www.telerik.com/community/forums/aspnet-ajax/grid/export-to-excel-in-sharepoint-application-page.aspx" target="_blank">http://www.telerik.com/community/forums/aspnet-ajax/grid/export-to-excel-in-sharepoint-application-page.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jiahu.net/export-to-excel-in-sharepoint-application-page-doesnt-work-on-second-time.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Styling Excel cells with mso-number-format</title>
		<link>http://jiahu.net/styling-excel-cells-with-mso-number-format.htm</link>
		<comments>http://jiahu.net/styling-excel-cells-with-mso-number-format.htm#comments</comments>
		<pubDate>Wed, 11 Feb 2009 15:34:45 +0000</pubDate>
		<dc:creator>@ouc</dc:creator>
				<category><![CDATA[工作]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[代码]]></category>

		<guid isPermaLink="false">http://cngator.net/?p=878</guid>
		<description><![CDATA[mso-number-format:”0&#8243; NO Decimals mso-number-format:”0\.000&#8243; 3 Decimals mso-number-format:”\#\,\#\#0\.000&#8243; Comma with 3 dec mso-number-format:”mm\/dd\/yy” Date7 mso-number-format:”mmmm\ d\,\ yyyy” Date9 mso-number-format:”m\/d\/yy\ h\:mm\ AM\/PM” D -T AMPM mso-number-format:”Short Date” 01/03/1998 mso-number-format:”Medium Date” 01-mar-98 mso-number-format:”d\-mmm\-yyyy” 01-mar-1998 mso-number-format:”Short Time” 5:16 mso-number-format:”Medium Time” 5:16 am mso-number-format:”Long Time” 5:16:21:00 mso-number-format:”Percent” Percent &#8211; two decimals mso-number-format:”0%” Percent &#8211; no decimals mso-number-format:”0\.E+00&#8243; Scientific Notation mso-number-format:”\@” <a href="http://jiahu.net/styling-excel-cells-with-mso-number-format.htm"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<table border="0" cellspacing="1" cellpadding="1">
<tbody>
<tr>
<td>mso-number-format:”0&#8243;</td>
<td>NO Decimals</td>
</tr>
<tr>
<td>mso-number-format:”0\.000&#8243;</td>
<td>3 Decimals</td>
</tr>
<tr>
<td>mso-number-format:”\#\,\#\#0\.000&#8243;</td>
<td>Comma with 3 dec</td>
</tr>
<tr>
<td>mso-number-format:”mm\/dd\/yy”</td>
<td>Date7</td>
</tr>
<tr>
<td>mso-number-format:”mmmm\ d\,\ yyyy”</td>
<td>Date9</td>
</tr>
<tr>
<td>mso-number-format:”m\/d\/yy\ h\:mm\ AM\/PM”</td>
<td>D -T AMPM</td>
</tr>
<tr>
<td>mso-number-format:”Short Date”</td>
<td>01/03/1998</td>
</tr>
<tr>
<td>mso-number-format:”Medium Date”</td>
<td>01-mar-98</td>
</tr>
<tr>
<td>mso-number-format:”d\-mmm\-yyyy”</td>
<td>01-mar-1998</td>
</tr>
<tr>
<td>mso-number-format:”Short Time”</td>
<td>5:16</td>
</tr>
<tr>
<td>mso-number-format:”Medium Time”</td>
<td>5:16 am</td>
</tr>
<tr>
<td>mso-number-format:”Long Time”</td>
<td>5:16:21:00</td>
</tr>
<tr>
<td>mso-number-format:”Percent”</td>
<td>Percent &#8211; two decimals</td>
</tr>
<tr>
<td>mso-number-format:”0%”</td>
<td>Percent &#8211; no decimals</td>
</tr>
<tr>
<td>mso-number-format:”0\.E+00&#8243;</td>
<td>Scientific Notation</td>
</tr>
<tr>
<td>mso-number-format:”\@”</td>
<td>Text</td>
</tr>
<tr>
<td>mso-number-format:”\#\ ???\/???”</td>
<td>Fractions &#8211; up to 3 digits (312/943)</td>
</tr>
<tr>
<td>mso-number-format:”\0022£\0022\#\,\#\#0\.00&#8243;</td>
<td>£12.76</td>
</tr>
<tr>
<td>mso-number-format:”\#\,\#\#0\.00_ \;\[Red\]\-\#\,\#\#0\.00\ “</td>
<td>2 decimals, negative numbers in red and signed<br />
(1.56   <span style="color: #cc0000;">-1.56</span>)</td>
</tr>
</tbody>
</table>
<p>用法举例：</p>
<p>当我们用&lt;<a href="mailto:%@page">%@page</a> contentType=”application/vnd.ms-excel; charset=UTF-8&#8243;%&gt;的方法导出网页文件为excel时，如果导出的数据中有数字以0开头，则该0会被省略，为了保留这个处于首位的0，可以在表格的style中加入：</p>
<p><span style="color: #ff0000;">style=&#8217;mso-number-format:”\@”;&#8217;</span></p>
<p>这样的话，导出的该表格中首位为0的数字就会将该0保留啦！</p>
<p>来源: <a href="http://blog.sina.com.cn/s/blog_5a010cd10100c3gs.html" target="_blank">http://blog.sina.com.cn/s/blog_5a010cd10100c3gs.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jiahu.net/styling-excel-cells-with-mso-number-format.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

