LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
function csv2tsv theData,theRemoveQuote
replace comma with tab in theData
replace "'" with quote in theData
put number of words of theData
repeat for each line myLine in theData
repeat for each word myWord in myLine
if myWord contains tab then replace tab with comma in myWord
put myWord & tab after myNewData
end repeat
delete last char of myNewData
put cr after myNewData
end repeat
if theRemoveQuote is true then replace quote with empty in myNewData
return myNewData
end csv2tsv
This function converts your comma-delimited data to tab-delimited data. If theRemoveQuote is true, it also removes the quotes.
Best regards,
Mark
Last edited by Mark on Fri Jul 10, 2009 12:49 pm, edited 2 times in total.
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode