<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Can a CSV file be displayed and edited in a table fashion. Excel mangles it.]]></title><description><![CDATA[<p dir="auto">I have to deal with long strings of CSV data. If I use Excel to do so it “helps” by stripping doublequotes from the file rendering it useless.<br />
The issue is that I need to see it in a table format to examine the data in aligned columns like Excel does. Can Notepad++ do this ?</p>
<p dir="auto">Below is an example of 2 lines of this data.</p>
<p dir="auto">“DI”,“A-DI”,“”,“Digital Placeholder for Dynamo Creation”,“SIM”,“”,“1:0”,“AUTO”,“ON”,“1”,“NO”,“OPEN”,“CLOSE”,“DISABLE”,“NONE”,“LOW”,“NONE”,“DISABLE”,“NONE”,“NONE”,“NONE”,“YES”,“Other”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“NONE”,“YES”,“NO”,“REJECT”,“NO”,“1,000”,“300,000”,“0”,“NO”,“NO”,“0”,“”,“NO”,“5,000.0”,“0.0”,“Milliseconds”,“ENABLE”,“0.0000”,“Absolute”,“0”,“ENABLE”,“CHOICES”<br />
“DI”,“AAHH_195”,“”,“Ozone Gen Room Hi Amb Ozone ALARM”,“IDS”,“”,“OzGen.33.ALM_AMBIENT_OZONE_HIGH”,“AUTO”,“ON”,“1”,“NO”,“OK”,“ALARM”,“ENABLE”,“NONE”,“CRITICAL”,“CLOSE”,“DISABLE”,“NONE”,“NONE”,“NONE”,“NO”,“Ozone”,“SMS_CRIT”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“Concentration over .3 ppm - Ventilation Started - Generators Shut Down”,“”,“NONE”,“YES”,“NO”,“REJECT”,“NO”,“1,000”,“300,000”,“0”,“NO”,“NO”,“0”,“”,“NO”,“5,000.0”,“0.0”,“Milliseconds”,“DISABLE”,“0.0000”,“Absolute”,“0”,“ENABLE”,“CHOICES”</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/25115/can-a-csv-file-be-displayed-and-edited-in-a-table-fashion-excel-mangles-it</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 03:20:21 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/25115.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 09 Nov 2023 16:21:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Can a CSV file be displayed and edited in a table fashion. Excel mangles it. on Fri, 10 Nov 2023 17:39:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/195">@guy038</a><br />
Your regex is better if everything is quoted, but that’s not really what I meant.</p>
<p dir="auto">In most CSV files, <strong>a column is only wrapped in quotes if it contains the separator or a newline.</strong></p>
<p dir="auto"><img src="/assets/uploads/files/1699637937184-3223309f-ecd6-4839-adbd-c3ff8c9fe1db-image.png" alt="3223309f-ecd6-4839-adbd-c3ff8c9fe1db-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">In the above example (pretty colors courtesy of CSVLint), <em>most columns aren’t wrapped in quotes</em> except column 3 of row 5 and column 2 of row 6. The other part of my regex is the <code>(?:[^"]|\\")*</code> alternation inside the quotes, which is necessary to allow an escaped quote character to be present inside quotes.</p>
<p dir="auto">Using my column regex <code>(?'column'(?:(?!")(?:(?!\r\n)[^,])*(?&lt;!")|"(?:[^"]|\\")*"))</code> converts</p>
<pre><code>nums,names,cities,date,zone,subzone,contaminated
nan,Bluds,BUS,,1,b,FALSE
0.5,dfsd,FUDG,12/13/2020 0:00,2,c,TRUE
1.2,qere,GOLAR,,3,f,TRUE
3.4,flodt,"comma,in \"column\"",,4,q,FALSE
4.6,"newline
in column",QUZ,10/17/2014 0:00,5,"",TRUE
7,Unyir,MOKJI,5/11/2017 0:00,6,i,TRUE
</code></pre>
<p dir="auto">to seven lines of <code>a,b,c,d,e,f,g</code> as expected.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90402</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90402</guid><dc:creator><![CDATA[Mark Olson]]></dc:creator><pubDate>Fri, 10 Nov 2023 17:39:24 GMT</pubDate></item><item><title><![CDATA[Reply to Can a CSV file be displayed and edited in a table fashion. Excel mangles it. on Fri, 10 Nov 2023 11:44:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/29651">@MyNameIsTooShort</a> said in <a href="/post/90366">Can a CSV file be displayed and edited in a table fashion. Excel mangles it.</a>:</p>
<blockquote>
<p dir="auto">It doesn’t however treat the data as columns. i.e. I can’t select a column of data to find/replace like you can in Excel - But this is not at all unexpected and probably too much to hope for in a text editor. But worth mentioning in case you had that trick in the queue.</p>
</blockquote>
<p dir="auto">You can also give the <a href="https://github.com/daddel80/notepadpp-multireplace#readme" rel="nofollow ugc">MultiReplace Plugin</a> a try, ? It allows you to filter find and replace operations by a specific CSV column scope, offering precise editing within your CSV files.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90390</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90390</guid><dc:creator><![CDATA[Thomas Knoefel]]></dc:creator><pubDate>Fri, 10 Nov 2023 11:44:39 GMT</pubDate></item><item><title><![CDATA[Reply to Can a CSV file be displayed and edited in a table fashion. Excel mangles it. on Fri, 10 Nov 2023 09:35:20 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/26710">@mark-olson</a> and <strong>All</strong>,</p>
<p dir="auto">I think I succeeded to <strong>simplify</strong> your <strong>generic</strong> regex. To be <strong>convinced</strong> of this fact, the magic regex, when <strong>QUOTE_CHAR</strong> = <strong><code>"</code></strong>  and <strong>DELIMITER_CHAR</strong> = <strong><code>,</code></strong> is :</p>
<ul>
<li>MARK <strong><code>(?:(?&lt;=^")|(?&lt;=","))[^\r\n]*?(?=","|"$)</code></strong></li>
</ul>
<p dir="auto">Now, test this <strong>regex</strong> against the text below, with <strong><code>63</code></strong> <strong>examples</strong>, pasted in a <strong>new</strong> tab</p>
<pre><code class="language-diff"># With a COMMA or DOUBLE QUOTES char in MIDDLE of column :

"abc,def","789"
"abc"def","789"
"123","abc,def","789"
"123","abc"def","789"
"123","abc,def"
"123","abc"def"

# With a COMMA or DOUBLE QUOTES char at BEGINNING of column :
",def","789"
""def","789"
"123",",def","789"
"123",""def","789"
"123",",def"
"123",""def"

# With a COMMA or DOUBLE QUOTES char at END of column :
"abc,","789"
"abc"","789"
"123","abc,","789"
"123","abc"","789"
"123","abc,"
"123","abc""

# With a COMMA or DOUBLE QUOTES char as a COMPLETE column :
",","789"
""","789"
"123",",","789"
"123",""","789"
"123",","
"123","""

# With an EMPTY column :
"","789"
"123","","789"
"123",""

# SINGLE column cases :
""
"abc"
",def"
"abc,def"
"abc,"
","
""def"
"abc"def"
"abc""
"""

# MICELLANEOUS SINGLE columns :
"ab""cd"
"ab",cd"
"ab,"cd"
"ab,"",cd"
"ab",,"cd"
"ab,""",cd"
"ab",,,"cd"
"ab"",,cd"
"ab,,""cd"

"""abcd"
"",abcd"
","abcd"
","",abcd"
"",,"abcd"
",""",abcd"
"",,,"abcd"
""",,abcd"
",,""abcd"

"abcd"""
"abcd","     # KO
"abcd,""
"abcd,"","   # KO
"abcd",,""
"abcd,""","  # KO
"abcd",,,""
"abcd"",,"
"abcd,,"""
</code></pre>
<ul>
<li>
<p dir="auto">As you can see, almost <strong>all</strong> the cases are <strong>correctly</strong> detected</p>
</li>
<li>
<p dir="auto"><strong>Empty</strong> strings are also matched with the <strong><code>zero length match</code></strong> call-tip</p>
</li>
<li>
<p dir="auto"><strong>Three</strong> columns <em>ONLY</em> resist ( as it ends with the <strong><code>","</code></strong> string ). However, we should live with these very <strong>special</strong> cases !</p>
</li>
<li>
<p dir="auto">The regex <strong>always</strong> get the <strong>total</strong> content of each <strong>column</strong>, minus the <strong><code>3</code></strong> cases, mentioned above !</p>
</li>
<li>
<p dir="auto"><em>NO</em> need to <strong>escape</strong> a possible QUOTE_CHAR or DELIMITER_CHAR ( as <strong><code>\"</code></strong> or <strong><code>\,</code></strong> ) in the <strong>column</strong> contents, in order to get the <strong>all</strong> its content ;-))</p>
</li>
</ul>
<hr />
<p dir="auto">So, for a <strong>seven</strong> columns <strong><code>CSV</code></strong> table <strong>exactly</strong>, we need this regex ( I shortened the <strong>column</strong> name to <strong><code>col</code></strong> ) :</p>
<ul>
<li>SEARCH <strong><code>"(?'col'(?:(?:(?&lt;=^")|(?&lt;=","))[^\r\n]*?(?=","|"$)))","((?&amp;col))","((?&amp;col))","((?&amp;col))","((?&amp;col))","((?&amp;col))","((?&amp;col))"</code></strong></li>
</ul>
<p dir="auto">Test it against the following text :</p>
<pre><code class="language-diff">"abcd","efgh","ijkl","mnop","qrst","uvwx","yz01"
",abcd","efgh","ij,kl","mnop","qrst,","uvwx",","
""abcd","efgh","ij"kl","mnop","qrst"","uvwx","""
"","","","","","",""
</code></pre>
<p dir="auto">Thus, the corresponding <strong>generic</strong> regex would be :</p>
<p dir="auto"><strong><code>"(?'col'(?:(?:(?&lt;=^QUOTE_CHAR)|(?&lt;=QUOTE_CHARDELIMITER_CHARQUOTE_CHAR))[^NEW_LINE_CHAR(s)]*?(?=QUOTE_CHARDELIMITER_CHARQUOTE_CHAR|QUOTE_CHAR$)))","((?&amp;col))","((?&amp;col))","((?&amp;col))","((?&amp;col))","((?&amp;col))","((?&amp;col))"</code></strong></p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90387</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90387</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Fri, 10 Nov 2023 09:35:20 GMT</pubDate></item><item><title><![CDATA[Reply to Can a CSV file be displayed and edited in a table fashion. Excel mangles it. on Thu, 09 Nov 2023 23:19:30 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://github.com/BdR76/CSVLint" rel="nofollow ugc">CSVLint is also good</a>. It can handle some pretty pathological files.</p>
<p dir="auto">Lastly, here’s a regular expression for matching a single column in any delimiter-separated variables file (replace all <code>NEWLINE</code> with your newline (<code>\r</code>, <code>\n</code>, or <code>\r\n</code>), <code>QUOTE_CHAR</code> with your quote character, and <code>DELIMITER</code> with your delimiter.<br />
<code>(?'column'(?:(?!QUOTE_CHAR)(?:(?!NEWLINE)[^DELIMITER])*(?&lt;!QUOTE_CHAR)|QUOTE_CHAR(?:[^QUOTE_CHAR]|\\QUOTE_CHAR)*QUOTE_CHAR))</code><br />
Putting it into practice, here’s that regex used to match all seven columns in separate capture groups for a 7-column CSV file with <code>"</code> as quote character and <code>\r\n</code> newline:<br />
<code>^(?'column'(?:(?!")(?:(?!\r\n)[^,])*(?&lt;!")|"(?:[^"]|\\")*")),((?&amp;column)),((?&amp;column)),((?&amp;column)),((?&amp;column)),((?&amp;column)),((?&amp;column))$</code></p>
<p dir="auto">You can verify that a regex works for capturing 7 columns of a CSV file by testing if find/replacing your regex with <code>(?1a),(?2b),(?3c),(?4d),(?5e),(?6f),(?7g)</code> replaces every row of the file with <code>a,b,c,d,e,f,g</code></p>
]]></description><link>https://community.notepad-plus-plus.org/post/90381</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90381</guid><dc:creator><![CDATA[Mark Olson]]></dc:creator><pubDate>Thu, 09 Nov 2023 23:19:30 GMT</pubDate></item><item><title><![CDATA[Reply to Can a CSV file be displayed and edited in a table fashion. Excel mangles it. on Thu, 09 Nov 2023 19:18:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/29651">@MyNameIsTooShort</a> said in <a href="/post/90366">Can a CSV file be displayed and edited in a table fashion. Excel mangles it.</a>:</p>
<blockquote>
<p dir="auto">Because your plugin still put these two in columns while still missing the doublequotes… I’m not sure yet if this is an artifact of your plugin or the entire reason I am having trouble with this file… but I expect its the latter and I will follow up.</p>
</blockquote>
<p dir="auto">I’m not yet sure what you mean, but if it is stripping the double quotes when converting from comma-separated values to tabs and you don’t want that, be sure the box <strong>Preserve quotes, escapes and blanks when converting to tabbed</strong> is checked.</p>
<p dir="auto">If you do not have that box checked, it will remove the quotes in your example when converting to tabbed. It won’t put them back when you convert back to comma-separated values because they aren’t required in a standards-compliant CSV file. I don’t have an option to quote all entries (though you could do that with regular expressions) — unless it interferes with your editing, it’s best to leave the quotes in place by checking the box if you need them.</p>
<p dir="auto">If it’s removing quotes when you checked that box, there is a bug.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90372</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90372</guid><dc:creator><![CDATA[Coises]]></dc:creator><pubDate>Thu, 09 Nov 2023 19:18:55 GMT</pubDate></item><item><title><![CDATA[Reply to Can a CSV file be displayed and edited in a table fashion. Excel mangles it. on Thu, 09 Nov 2023 19:05:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/29651">@MyNameIsTooShort</a> said in <a href="/post/90366">Can a CSV file be displayed and edited in a table fashion. Excel mangles it.</a>:</p>
<blockquote>
<p dir="auto">I can’t select a column of data to find/replace like you can in Excel</p>
</blockquote>
<p dir="auto">Notepad++ can make rectangular selections. Click at one corner of the rectangle you want to select; then Alt+Shift+click at the diagonally opposite corner. See the <a href="https://coises.github.io/ColumnsPlusPlus/help.htm#rectangular" rel="nofollow ugc">help on Rectangular selections</a> for a bit more information. (One tip is that if you make an ordinary selection in a single line covering the column or columns you want, when a rectangular selection is needed, Columns++ will offer to extend your selection vertically. That makes it easy to select a column, and to start on the line after the headers if that’s want you want.)</p>
<p dir="auto">The native search in Notepad++ can’t find or replace in rectangular selections, but the <a href="https://coises.github.io/ColumnsPlusPlus/help.htm#search" rel="nofollow ugc">Search…</a> function in Columns++ can. (Strictly speaking, it creates a search region from a rectangular selection — a complexity I didn’t like, but found necessary to make everything consistent and usable.)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90371</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90371</guid><dc:creator><![CDATA[Coises]]></dc:creator><pubDate>Thu, 09 Nov 2023 19:05:59 GMT</pubDate></item><item><title><![CDATA[Reply to Can a CSV file be displayed and edited in a table fashion. Excel mangles it. on Thu, 09 Nov 2023 18:46:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/29651">@MyNameIsTooShort</a> said in <a href="/post/90366">Can a CSV file be displayed and edited in a table fashion. Excel mangles it.</a>:</p>
<blockquote>
<p dir="auto">It doesn’t however treat the data as columns. i.e. I can’t select a column of data to find/replace like you can in Excel</p>
</blockquote>
<p dir="auto">If you want that and understand SQL, have a look at <a href="https://github.com/jokedst/CsvQuery" rel="nofollow ugc">CSVQuery</a>.</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90368</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90368</guid><dc:creator><![CDATA[Michael Vincent]]></dc:creator><pubDate>Thu, 09 Nov 2023 18:46:25 GMT</pubDate></item><item><title><![CDATA[Reply to Can a CSV file be displayed and edited in a table fashion. Excel mangles it. on Thu, 09 Nov 2023 18:40:11 GMT]]></title><description><![CDATA[<p dir="auto">That’s a great plugin.  It worked so far just as advertised and will be a great help with locating data.<br />
It doesn’t however treat the data as columns. i.e. I can’t select a column of data to find/replace like you can in Excel - But this is not at all unexpected and probably too much to hope for in a text editor. But worth mentioning in case you had that trick in the queue.<br />
Because your plugin still put these two in columns while still missing the doublequotes… I’m not sure yet if this is an artifact of your plugin or the entire reason I am having trouble with this file… but I expect its the latter and I will follow up. Thanks again.<br />
Well I tried to post a pic to explain above,  but I have no reputation yet so I can’t.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90366</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90366</guid><dc:creator><![CDATA[MyNameIsTooShort]]></dc:creator><pubDate>Thu, 09 Nov 2023 18:40:11 GMT</pubDate></item><item><title><![CDATA[Reply to Can a CSV file be displayed and edited in a table fashion. Excel mangles it. on Thu, 09 Nov 2023 16:43:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/29651">@MyNameIsTooShort</a> said in <a href="/post/90359">Can a CSV file be displayed and edited in a table fashion. Excel mangles it.</a>:</p>
<blockquote>
<p dir="auto">I have to deal with long strings of CSV data. If I use Excel to do so it “helps” by stripping doublequotes from the file rendering it useless.<br />
The issue is that I need to see it in a table format to examine the data in aligned columns like Excel does. Can Notepad++ do this ?</p>
</blockquote>
<p dir="auto">Notepad++ cannot do this without adding a plugin, but a plugin I’m developing, called <a href="https://github.com/Coises/ColumnsPlusPlus/releases" rel="nofollow ugc">Columns++</a>, can help you.</p>
<p dir="auto">In my experience this plugin is stable; however, it’s not yet in Plugins Admin and it has not yet had extensive real-world testing. Be sure you have a safety copy of your data, just in case. The link above goes to the latest release on GitHub; there you will find a link to a “quick installer” which you can use if you have Notepad++ installed in the default location.</p>
<p dir="auto">The steps would be to use <a href="https://coises.github.io/ColumnsPlusPlus/help.htm#conversion" rel="nofollow ugc">Convert separated values to tabs…</a>, enable <a href="https://coises.github.io/ColumnsPlusPlus/help.htm#elastic" rel="nofollow ugc">Elastic tabstops</a>, view and edit as needed and then use <strong>Convert tabs to separated values…</strong> to restore the original format.</p>
<p dir="auto">You will want to be sure <strong>Preserve quotes, escapes and blanks when converting to tabbed</strong> is checked when you convert.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90361</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90361</guid><dc:creator><![CDATA[Coises]]></dc:creator><pubDate>Thu, 09 Nov 2023 16:43:01 GMT</pubDate></item></channel></rss>