<?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>Solution Log &#124; Antonio David - NVNCBL &#187; excel</title>
	<atom:link href="http://www.nvncbl.com/tagged/excel/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nvncbl.com</link>
	<description>A place to log my programming solutions for future reference</description>
	<lastBuildDate>Sun, 28 Aug 2011 01:20:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Solution to Excel&#8217;s CSV Output Formats</title>
		<link>http://www.nvncbl.com/2009/08/solution-to-excels-csv-output-formats/</link>
		<comments>http://www.nvncbl.com/2009/08/solution-to-excels-csv-output-formats/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 05:23:17 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=352</guid>
		<description><![CDATA[Recently I&#8217;ve had to import a client&#8217;s catalog data from Excel 2007 to the Magento eCommerce Platform.  The data in Excel was unsurprisingly in a format that was unsupported by Magento&#8217;s import methods.  Using code, I needed to parse Excel data into the format Magento required.  In PHP, I wasn&#8217;t aware of [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve had to import a client&#8217;s catalog data from Excel 2007 to the Magento eCommerce Platform.  The data in Excel was unsurprisingly in a format that was unsupported by Magento&#8217;s import methods.  Using code, I needed to parse Excel data into the format Magento required.  In PHP, I wasn&#8217;t aware of any way to interface with .xls or .xlsx files, so I tried exporting the data to flat-file CSV, where it could be easily manipulated using PHP&#8217;s native CSV functions.</p>
<p><span id="more-352"></span>Unfortunately, none of the three CSV formats that Excel outputs could be properly parsed as CSV.  For example, accepted CSV standards state that values should be:</p>
<pre>"value1","value2","escaped "" double quote", "value 3", "", "", "7th column"</pre>
<p>But in Excel&#8217;s version of CSV, that would look like:</p>
<pre>value1,value2,"escaped "" double quote",value 3,,,7th column
</pre>
<p>It&#8217;s terribly inconsistent in its use of double quotes, confusing the hell out of many CSV parsers.</p>
<p><strong>The Solution:</strong></p>
<p><a title="CSV to XML Converter" href="http://www.creativyst.com/Prod/15/" class="external">CSV to XML Converter</a> by <a title="Creativyst" href="http://www.creativyst.com/" class="external">Creativyst(R)</a>.  It takes in CSV garbage and returns immaculate and clean XML.  Then use your language-of-choice&#8217;s XML functions to work with the data.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2009/08/solution-to-excels-csv-output-formats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

