Tech Note: Using Match regex to Import CSV data
PRODUCT: 4D | VERSION: 11.2 | PLATFORM: Mac & Win
Published On: September 4, 2008
The complexities of importing a Comma-Separated Values (CSV) file are greatly simplified by using the Match regex command in 4D v11 SQL. This Technical Note presents a 4D method that can be used to parse CSV files, using the Match regex command.
A sample database is included.
Download Complete Tech Note and Example: Windows | Mac
Commented by Walt Nelson on July 29, 2013 at 7:30 AM
In the method - CSVRE - there is an error if you try to import more than 50 fields.Here is the offending line followed by the fix. //APPEND TO ARRAY($CSV_Flds_aT;$RIS) this is wrong wwn July 28, 2013: $vlElem:=Size of array($CSV_Flds_aT) 1INSERT IN ARRAY($CSV_Flds_aT;$vlElem;$RIS) // he is expanding the size of the array by 50Thanks to Charlie Vass for this great tech note.Walt Nelson (Seattle)