Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subscript
Message
From
14/11/2021 05:46:53
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
13/11/2021 21:04:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01682701
Message ID:
01682721
Views:
41
>If I'm interpreting the situation right, then you've got a mismatch between the CSV file and the sample table. If aDV[] array is being populated from the CSV and the cFlds[] is populated from the table, then it means you've got more columns in the table than there are in the CSV file.

That's another trouble with csv files, that the number of expected fields may not be met. It quite often happens that there's a delimiter inside a field value, or that some of the trailing fields are not exported when blank (yup, seen that too, perhaps not from spreadsheet apps but maybe Clarion or other apps which are able to export).

One solution is to dimension the column names array from the file itself, reading the first row as column names. Which is still not foolproof, as it can also happen that there's a column without a header.

CSV is a bread with seven crusts.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform