2

I have a file names.txt with this data:

NAME;AGE;
alberto;22
andrea;51
ana;16

and I want to add a new column N with the line number of the row:

N;NAME;AGE;
1;alberto;22
2;andrea;51
3;ana;16

I've been looking and what I found was something related with Add sequence. I tried but I don't know how.

Thank you very much.

4

1 回答 1

2

Add Sequence步骤将完成工作,但您甚至不需要它。CSV file input和步骤都Text file input可以向输入行添加行号。对于“CSV 文件输入”步骤,它称为“行号字段名称(可选)”。

对于Text file input,请检查“输出中的 Rownum?” 框并填写“Rownum fieldname”文本框。

我真的很困惑为什么你无法弄清楚这Add sequence一步。它应该完全没有变化。只需将其放入并将 csv 文件的输出连接到它,该序列应显示为名为“valuename”的字段名称。我会亲自改变它,但它仍然应该工作。

于 2014-04-07T16:44:31.373 回答