||Re: separator for CSV file to be imported into dBase
Mervyn Bick <email@example.com>
||Thu, 24 Sep 2020 10:30:45 +0200
On 2020/09/23 23:29, Gaetano wrote:
> There was a typo in Akshat's code ";" = Chr(59), I added the double
> quotes in the same stuff operation. Try this (mind the wordwrap for the
> line starting with "stuff", it belongs to the previous line).
Akshat posted his example before Jean gave us examples of the input
data. He did, however, say that the code was written to deal with a tab
separated file. It was only meant as a very broad example to serve as
the basis for new code.
I'm afraid changing the separator from ; to , and wrapping each field in
double quotes in the .csv file is not appropriate in this case.
Character fields only really need to be delimited if they contain
commas. In this case though the comma in a field is actually the
decimal point of a numeric value.
Wrapping a numeric value in double quotes in a .csv file confuses dBASE.
In the attached screenshot the first two records were created by the
little program I posted yesterday. The second two records were created
by appending from the output.csv file that you provided.
> I am not sure I understand your comment about 500 successive fields,
> surely no table has 500 fields... can you clarify? (je parle francais si
> ca peut faciliter les choses, meme si pour avoir des reponses des vrais
> experts, l'anglais est preferable)
A table with 500 fields is unusual (and unwieldy :-) ) but dBASE can
handle up to 1024 fields in a record with a limitation of 32767 bytes
per record. "Wide" files are fairly common in .csv files where data
from normalised tables are joined to provide a single .csv file for
If messages are posted in this newsgroup they should be in English. If
language is a problem Google Translate or DeepL usually do a good enough
job so that the gist of the message written in a different language is
clear in English.