Working with csv files

Post

Posted
Rating:
#1 (In Topic #1252)
Regular
bill-lancaster is in the usergroup ‘Regular’
The topic raised by stevedee on 30th January 2020  (Gambas One - Gambas ONE) has been very useful.
01McAc observed that CsvFile changes the case of the first line (Header)  in a .csv file.
I'm downloading bank and credit card data as csv files and some of them do not have a header.  This causes a problem when searching a mysql database.
My workaround is to insert a blank line as the first line in the csv file.
I wonder if there is a better way?
Online now: No Back to the top

Post

Posted
Rating:
#2
Guru
BruceSteers is in the usergroup ‘Guru’
Name case changes can be stopped using CsvFile.KeepNames = True
/comp/gb.util/csvfile/keepnames - Gambas Documentation

It was broken in older gambas versions but I fixed it..
https://forum.gambas.one/viewtopic.php?t=1728
Online now: No Back to the top

Post

Posted
Rating:
#3
Regular
bill-lancaster is in the usergroup ‘Regular’
 Well thank you Bruce!
Of course I should have checked first.
Bill
Online now: No Back to the top
1 guest and 0 members have just viewed this.