Is there a way to add a line break to a CSV file? My app loads the cvs file to display the data in a table view and search. Any idea? I need a line break or any kind of text separator to show more results in the same page. Any help is more than welcome :)
Try to add /n into the results.
let resultsArray = ["1","2"]
for str in resultsArray {
cell.text = str + "/n"
}
----------------Update-----------------------
You can convert CSV file into sqlite, then to read it. I did it before, Just FYI:
sqlite> create table foo(a, b);
sqlite> .mode csv
sqlite> .import test.csv foo
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.