{"id":223,"date":"2011-05-18T12:33:10","date_gmt":"2011-05-18T12:33:10","guid":{"rendered":"http:\/\/www.sitekickr.com\/blog\/?p=223"},"modified":"2011-05-18T12:33:10","modified_gmt":"2011-05-18T12:33:10","slug":"csv-export-leading-zeros","status":"publish","type":"post","link":"https:\/\/www.sitekickr.com\/blog\/csv-export-leading-zeros\/","title":{"rendered":"CSV export &#8211; leading zeros"},"content":{"rendered":"<p>As far as I know, there isn&#39;t a &quot;real&quot; solution to this problem. Both Excel, Works &amp; OpenOffice treat anything that can be converted to a number as a number, whether it is wrapped in double quotes or not.<\/p>\n<p>The closest I&#39;ve come to a solution is to:<\/p>\n<ul>\n<li>Wrap the number in double quotes<\/li>\n<li>Also include a single quote before the leading zero<\/li>\n<\/ul>\n<p>I haven&#39;t tested this in Excel, but in OpenOffice it appears to force the number into a text format. The single quote also does not appear in the print preview.<\/p>\n<p>This seems to be a shortcoming of the csv format. It is supposed to be a very simple format, but it seems to fall short with this very common issue.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As far as I know, there isn&#39;t a &quot;real&quot; solution to this problem. Both Excel, Works &amp; OpenOffice treat anything that can be converted to&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"amp_status":""},"categories":[77],"tags":[],"_links":{"self":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/223"}],"collection":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/comments?post=223"}],"version-history":[{"count":1,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/223\/revisions"}],"predecessor-version":[{"id":224,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/223\/revisions\/224"}],"wp:attachment":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/media?parent=223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/categories?post=223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/tags?post=223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}