Joachim,
It works for me:
String streamContents: [ :out |
(NeoCSVWriter on: out)
addField: #x; addConstantField: String empty; addField: #y;
nextPutAll: { 1@2. 3@4 } ].
=> '"1","","2"
"3","","4"
'
What is the value of the instance variable #fieldWriter inside NeoCSVWriter ?
It
Sven,
hmm. The fields I need to write are known not to be written with my
application, so I am lloking for a way to define a field as being an
empty quoted field at all times.
So for I've tried:
addConstantField: nil --> Exception
addObjectFied: [:a| ] --> empty field without quotes
addConsta
Hi Joachim,
nil fields normally write as 'empty quoted fields':
String streamContents: [ :out | (NeoCSVWriter on: out) nextPut: #(nil nil nil)
].
=> '"","",""'
Is this not what you want/need ?
Sven
> On 22 Dec 2017, at 15:05, jtuc...@objektfabrik.de wrote:
>
> Hi,
>
> I need to write a nu
Hi,
I need to write a number of empty quoted fields in a CSV export. The
receiving application will complain about missing quotes for empty text
fields... (don't ask, I've done all the eye rolling for you already)
My frst attempt was:
writer addConstantField: '""'.
But this doesn't write t