Keisuke,
a text file is being created (tab delimited, or CSV) as the exact use 
case for the export may vary by user. Some may/will want to open in 
excel, others may want to use the data in other programs. A text file 
is basic, can (in principle) be opened by anything.

<Rant>
(not) XML for 3 reasons
- one is the above
- while I can read, and can manually (by code) rip an xml file apart*, 
I am not comfortable(?) knowledgable in creating xml.  Sure I can setup 
"tags" (<column1> data </column1>) but F if I know if it is correct, or 
parsable by anything.
- for most (of my) uses xml is a waste of time and space.

* NOTE: I just had a situation where I had to import an "xml" file. The 
file format as provided (and required) does/did not follow xml 
standards (no line breaks, and other issues), so none of the xml 
commands work. Ended up tearing it apart as if it were a fancy 
formatted text file. So much work so much extra garbage in the file to 
skip over.... 
Converting 1 data block to tab delimited changes the size (characters) 
of the data block from 11 lines, and 400 characters to 1 line and 102 
characters. There is NO, ZERO, NONE advantage to using xml in this 
situation, as if there is any change in the format in the future, the 
code to manage the import will need to be revisited as the "xml" is 
invalid.
</Rant>

And yes I realize the irony - intentional - in using xml/html style 
markers for the rant  :)



On Wed, 28 Nov 2018 08:43:27 +0000, Keisuke Miyako via 4D_Tech wrote:
> I suppose the right way to create a "cell" with multiple lines in TSV 
> is to use vertical tab char(11) instead of CRLF,
> but the last time I checked, Excel doesn't handle VT well. (Numbers does).
> 
> for CSV with quotes I published
> 
> https://github.com/miyako/4d-component-csv
> 
> which follows the various rules explained here
> 
> https://en.wikipedia.org/wiki/Comma-separated_values
> 
> https://tools.ietf.org/html/rfc4180
> 
> in any case, it doesn't feel right to pretend that CSV or TSV is an 
> Excel spreadsheet.
> 
> why not at least use XML, if XLS or XLSX is a bit of an overkill?
> 
> the method has been around since v2004 (introduction of PROCESS 4D 
> TAGS and DOM/SAX XML commands)
> 
> 
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************
---------------
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to