<?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>Chris: Geek Guy &#187; text</title>
	<atom:link href="http://chris.gg/tag/text/feed/" rel="self" type="application/rss+xml" />
	<link>http://chris.gg</link>
	<description>Tech news and other stuff from a UK-based web developer and all-round geek</description>
	<lastBuildDate>Tue, 06 Dec 2011 19:40:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Banish quotation marks from text files exported from Excel</title>
		<link>http://chris.gg/2006/08/banish-quotation-marks-from-text-files-exported-from-excel/</link>
		<comments>http://chris.gg/2006/08/banish-quotation-marks-from-text-files-exported-from-excel/#comments</comments>
		<pubDate>Sat, 26 Aug 2006 21:48:06 +0000</pubDate>
		<dc:creator>Chris Barnes</dc:creator>
				<category><![CDATA[Hints & Tips]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[quote]]></category>
		<category><![CDATA[text]]></category>
		<guid isPermaLink="false">http://chris.gg/2006/08/banish-quotation-marks-from-text-files-exported-from-excel/</guid>
		<description><![CDATA[When exporting Excel worksheets to CSV (comma-separated values) or tab-delimited text, it will add quotation marks (&#8220;..&#8221;) around any fields containing commas or quotes. While such files can be re-imported into Excel without problems, it can cause other applications to choke. It is possible to open the files in a text editor to remove the [...]]]></description>
			<content:encoded><![CDATA[<p>When exporting Excel worksheets to CSV (comma-separated values) or tab-delimited text, it will add quotation marks (&#8220;..&#8221;) around any fields containing commas or quotes.</p>
<p>While such files can be re-imported into Excel without problems, it can cause other applications to choke. It is possible to open the files in a text editor to remove the problematic characters, or create a Word macro to do the same job automatically, but the simplest solution is to bypass Excel&#8217;s own file export filters and use a macro such as the following to perform the export:</p>
<pre>Public Sub TextNoModification()
Const DELIMITER As String = "," 'or "|", vbTab, etc.
Dim myRecord As Range
Dim myField As Range
Dim nFileNum As Long
Dim sOut As String
nFileNum = FreeFile
Open "Test.txt" For Output As #nFileNum
For Each myRecord In Range("A1:A" &amp; _
Range("A" &amp; Rows.Count).End(xlUp).Row)
With myRecord
For Each myField In Range(.Cells(1), _
Cells(.Row, Columns.Count).End(xlToLeft))
sOut = sOut &amp; DELIMITER &amp; myField.Text
Next myField
Print #nFileNum, Mid(sOut, 2)
sOut = Empty
End With
Next myRecord
Close #nFileNum
End Sub</pre>
<p>The delimiter and output filename can be changed by editing the code. The macro above is taken from <a href="http://www.mcgimpsey.com/excel/textfiles.html">this very useful page</a> from <a href="http://www.mcgimpsey.com/">McGimpsey &amp; Associates</a> which contains a <a href="http://www.mcgimpsey.com/excel/index.html">whole host of Excel tips</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://chris.gg/2006/08/banish-quotation-marks-from-text-files-exported-from-excel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

