Demo for TWebConnection loading from CSV?

Today's announcement says, "TWebClientConnection can now load CSV files into a TWebClientDataSet for seamless data management."

Indeed, I see that contents of my csv file show up in a WebDBGrid when I set the URI property to fetch it, but the contents of my (comma-separated value) file are not arranged correctly and the included headers are evidently not used by default. There seem to be no new properties of TWebClientConnection, so how should the separator character and header-presence flag be set? Is there a Demo project??

At this moment, the delimiter is expected to be the standard ',' delimiter.
We'd need to make this customizable via a property in a future update.

Thanks for the clarification. What about the headers? Are they assumed to be included or not currently? A simple demo would be very helpful!

The headers for the HTTP(s) request are set via WebClientConnection.Headers

Sorry, I should have been clearer. I was referring to the table column headers in the first row and whether or not they are included in the imported data file. How is that handled?

In the current version, the first line is returned in the data
We'll consider adding a property to control this.

Thanks for the clarification.

I see that has Delimiter and SkipFirstCSVLine parameters added already, thanks! I think, however, that it would be more useful to treat the CSV first line optionally as the column headers, such as is done for TWebStringGrid.LoadFromCSV, where there is a Boolean argument that controls this behavior.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

We'll consider this.