<?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>Excel &#8211; Kodono</title>
	<atom:link href="https://blog.kodono.info/wordpress/tag/excel/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.kodono.info/wordpress</link>
	<description>Pour tous les technophiles</description>
	<lastBuildDate>Fri, 11 Dec 2015 11:03:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.1</generator>
	<item>
		<title>Excel file as an HTML table and Date formatting</title>
		<link>https://blog.kodono.info/wordpress/2015/12/11/excel-file-as-an-html-table-and-date-formatting/</link>
					<comments>https://blog.kodono.info/wordpress/2015/12/11/excel-file-as-an-html-table-and-date-formatting/#respond</comments>
		
		<dc:creator><![CDATA[Aymeric]]></dc:creator>
		<pubDate>Fri, 11 Dec 2015 11:03:06 +0000</pubDate>
				<category><![CDATA[Niveau intermédiaire]]></category>
		<category><![CDATA[Programmation]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Excel]]></category>
		<guid isPermaLink="false">http://blog.kodono.info/wordpress/?p=1575</guid>

					<description><![CDATA[If you create an Excel file using an HTML Table, then it exists a way to format the cells based on some CSS rules. Some examples can be found on this blog post. I spent some time trying to figure out how to display correctly the dates, whatever your regional settings are ; for exemple [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>If you create an Excel file using an HTML Table, then it exists a way to format the cells based on some CSS rules. Some examples can be found on <a href="http://niallodoherty.com/post.cfm/basic-html-to-excel-formatting">this blog post</a>.</p>
<p>I spent some time trying to figure out how to display correctly the dates, whatever your regional settings are ; for exemple in the USA the format is <code>MM/dd/YYYY</code>, and for the rest of the world is <code>dd/MM/YYYY</code>.</p>
<p>Finally I <a href="http://stackoverflow.com/a/25568552/1134119">found</a> that the content of the date cells must always be defined with the same format : <code>YYY-MM-dd HH:mm</code>, and then we can apply a style like <code>mso-number-format:"dd\-mmm\-yyyy\ hh\:mm"</code>.</p>
<p>Example:</p>
<pre class="brush:html">
&lt;html>
&lt;head>
&lt;style>br {mso-data-placement:same-cell} .xls-date {mso-number-format:"dd-mmm-yyyy hh:mm"}&lt;/style>
&lt;/head>
&lt;body>
  &lt;table>
    &lt;tr>
      &lt;th>Event Name&lt;/th>
      &lt;th>Event Date&lt;/th>
    &lt;/tr>
    &lt;tr>
      &lt;td>Birthday Party&lt;/td>
      &lt;td class="xls-date">2015-11-01 10:00&lt;/td>
    &lt;/tr>
  &lt;/table>
&lt;/html>
</pre>
<p>So the date cell will display: <code>01-Nov-2015 10:00</code> and will be interpreted as a Date cell by Excel.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.kodono.info/wordpress/2015/12/11/excel-file-as-an-html-table-and-date-formatting/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
