Re: v13 - Exporting tab delimited

2018-11-28 Thread Keisuke Miyako via 4D_Tech
you can export related fields. the component expects an object array as JSON. you just use 4D commands to populate that array however way you like. true, Selection to JSON does not activate automatic relations, but it is by no means the only way to create an object array. the component is quite

Re: v13 - Exporting tab delimited

2018-11-28 Thread Chip Scheide via 4D_Tech
I did get a copy, and opened it. - Thanks I pulled some of the regex from it. hence the questions earlier about why the results from the regex. BTW - my impression on the CSV export is that it would work for a simple one table export, but that a complex export (like an invoice) would not really

Re: v13 - Exporting tab delimited

2018-11-28 Thread Keisuke Miyako via 4D_Tech
that's fair, exporting XML spreadsheets only makes sense if the idea is to open it with Excel. for CSV or TSV with proper quotation of data that contains CR, LF, quotes, commas, etc. the example https://github.com/miyako/4d-component-csv is for v15 and above but the core regex stuff might be

Re: v13 - Exporting tab delimited

2018-11-28 Thread THOMAS BENEDICT via 4D_Tech
Hi Chip, The trick with Excel is that it uses a 'soft return' within a cell. To get that soft-return within Excel you type Alt-Return (on Windows) or Control-Option-Return (on MacOS). I don't remember what the Character Code is for that character, but that's what you'll need to include in

Re: v13 - Exporting tab delimited

2018-11-28 Thread THOMAS BENEDICT via 4D_Tech
I spent many hours sorting this out a few months ago. The file needed to be easily read by Excel (as in your case) plus it needed to be importable into SQL Server. I ended up creating a CSV with CRLF record delimiters. But I also processed the embedded soft returns in a way that escapes me

Re: v13 - Exporting tab delimited

2018-11-28 Thread Chip Scheide via 4D_Tech
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. (not) XML for 3 reasons

RE: v13 - Exporting tab delimited

2018-11-28 Thread Chip Scheide via 4D_Tech
Thanks - I'll try that too On Wed, 28 Nov 2018 08:30:01 +, Epperlein, Lutz (agendo) via 4D_Tech wrote: > You have to escape the data cell containing the linefeed with double > quotes. The linefeed has to be encoded as a LF (0x0a) or as CRLF > (0x0d 0x0a). > > E.g. > Data data data >

Re: v13 - Exporting tab delimited

2018-11-28 Thread Chip Scheide via 4D_Tech
THANKS! On Tue, 27 Nov 2018 16:06:39 -0800 (PST), THOMAS BENEDICT wrote: > I spent many hours sorting this out a few months ago. The file needed > to be easily read by Excel (as in your case) plus it needed to be > importable into SQL Server. I ended up creating a CSV with CRLF > record

Re: v13 - Exporting tab delimited

2018-11-28 Thread Keisuke Miyako via 4D_Tech
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

RE: v13 - Exporting tab delimited

2018-11-28 Thread Epperlein, Lutz (agendo) via 4D_Tech
You have to escape the data cell containing the linefeed with double quotes. The linefeed has to be encoded as a LF (0x0a) or as CRLF (0x0d 0x0a). E.g. Data data data data data "line1 line2" datadatadata This text file you can drag onto Excel to open it (Windows). Double click

Re: v13 - Exporting tab delimited

2018-11-27 Thread Douglas von Roeder via 4D_Tech
ft Return is 11 > > Randy Engle > > -Original Message- > From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of Chip Scheide > via 4D_Tech > Sent: Tuesday, November 27, 2018 3:51 PM > To: benedic...@comcast.net > Cc: Chip Scheide <4d_o...@pghrepository.

RE: v13 - Exporting tab delimited

2018-11-27 Thread Randy Engle via 4D_Tech
d_tech@lists.4d.com Subject: Re: v13 - Exporting tab delimited Thomas & Chuck the intent is to create the export file in such a manner that NO user intervention is required to open the file with the embedded returns. changing the end of row marker will work, but then the user

Re: v13 - Exporting tab delimited

2018-11-27 Thread Chip Scheide via 4D_Tech
Thomas & Chuck the intent is to create the export file in such a manner that NO user intervention is required to open the file with the embedded returns. changing the end of row marker will work, but then the user(s) need to know that -- and they won't or they won't remember etc -- after all

Re: v13 - Exporting tab delimited

2018-11-27 Thread Charles Miller via 4D_Tech
You will need to change end of row delimiter to asomething other than a carriage return. Perhaps a tilde. You will need to set up excel as well to use the new character. Just make sure that if you have such a character in any text field you escape it. Regards Chuck On Tue, Nov 27, 2018 at 5:09