Here is a script that I keep in Bbedit's script folder to clean up Excel's CSV 
formatting.
I get why Excel does this, but I do not get why they do it even in a TAB 
delimited file.

tell application "BBEdit"
        activate
        replace "\"     " using "       " searching in text 1 of text window 1 
options {search mode:literal, starting at top:true, wrap around:false, 
backwards:false, case sensitive:false, match words:false, extend 
selection:false}
        replace "       \"" using "     " searching in text 1 of text window 1 
options {search mode:literal, starting at top:true, wrap around:false, 
backwards:false, case sensitive:false, match words:false, extend 
selection:false}
        replace "^\"\\(" using "\\(" searching in text 1 of text window 1 
options {search mode:grep, starting at top:true, wrap around:false, 
backwards:false, case sensitive:false, match words:false, extend 
selection:false}
        replace "^\"" using "" searching in text 1 of text window 1 options 
{search mode:grep, starting at top:true, wrap around:false, backwards:false, 
case sensitive:false, match words:false, extend selection:false}
        replace "\"$" using "" searching in text 1 of text window 1 options 
{search mode:grep, starting at top:true, wrap around:false, backwards:false, 
case sensitive:false, match words:false, extend selection:false}
        replace "\"\"" using "\"" searching in text 1 of text window 1 options 
{search mode:grep, starting at top:true, wrap around:false, backwards:false, 
case sensitive:false, match words:false, extend selection:false}
end tell


Thanks,
Ted
***********************  Ted Burger  ****************************
[email protected]      *********     www.tobsupport.com



> On Oct 15, 2017, at 10:45 AM, jgill <[email protected]> wrote:
> 
> Unless I am completely misunderstanding, I thought that BBEdit 12 could open 
> a CSV file and display it in columns like a spreadsheet. I can find any way 
> to do this.
> 
> My bank allows me to download a CSV file of my account and Numbers doesn't 
> know how to handle it because of the quote marks and commas. It must be an 
> Excel thing, but it doesn't work on a Mac.
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or would like to report a problem, please email
> "[email protected]" rather than posting to the group.
> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit 
> <http://www.twitter.com/bbedit>>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/bbedit 
> <https://groups.google.com/group/bbedit>.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to