# reduce / filter the number of words in rows

**URL:** <https://forum.knime.com/t/reduce-filter-the-number-of-words-in-rows/17205>\
**Category:** KNIME Analytics Platform\
**Created:** [July 27, 2019, 7:14pm UTC](https://forum.knime.com/t/reduce-filter-the-number-of-words-in-rows/17205 "2019-07-27T19:14:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![umutcankurt](https://forum-cdn.knime.com/user_avatar/forum.knime.com/umutcankurt/32/70644_2.png) [@umutcankurt](https://forum.knime.com/u/umutcankurt)\
**Post date:** [July 27, 2019, 7:14pm UTC](https://forum.knime.com/t/reduce-filter-the-number-of-words-in-rows/17205/1 "2019-07-27T19:14:36Z")

</div>

Hi;  
I want to reduce / filter the number of words in rows and transfer them to the new table. How is it possible to do this only in certain columns?

For example; How can I transfer the character or text in the rows in column A to another table by filtering - reducing string to a specific character.

goal; I want to write the information from the existing data table to the excel table, but the number of characters in the rows prevents it. I am trying to produce a method to overcome this problem.

> [@Help for Excel data writing problem](https://forum.knime.com/t/help-for-excel-data-writing-problem/17198):
>
> Hello; I want to write the data excele but I get a character limit warning. can you help us find alternative ways to solve this problem or suggest a solution? I dropped it by 10,000 row, but I still got the same mistake. [image] [image]

@armingrudd

---

<div class="post-metadata">

**Author:** ![quaeler](https://forum-cdn.knime.com/user_avatar/forum.knime.com/quaeler/32/3944_2.png) [@quaeler](https://forum.knime.com/u/quaeler)\
**Post date:** [July 27, 2019, 7:46pm UTC](https://forum.knime.com/t/reduce-filter-the-number-of-words-in-rows/17205/2 "2019-07-27T19:46:10Z")

</div>

You could use the Column Expressions node to use the `length` function to determine whether the string is more than 32K characters and if so use the `substr` function to chop it down (using an if block… ) like:

```auto
if (length(column("someColumn")) > 32767) {
    substr(column("someColumn"), 0, 32764) + "...";
} else {
    column("someColumn");
}

```

---

<div class="post-metadata">

**Author:** ![umutcankurt](https://forum-cdn.knime.com/user_avatar/forum.knime.com/umutcankurt/32/70644_2.png) [@umutcankurt](https://forum.knime.com/u/umutcankurt)\
**Post date:** [July 27, 2019, 8:18pm UTC](https://forum.knime.com/t/reduce-filter-the-number-of-words-in-rows/17205/3 "2019-07-27T20:18:12Z")

</div>

@quaeler  
Is it possible to add a sample workflow?

---

<div class="post-metadata">

**Author:** ![quaeler](https://forum-cdn.knime.com/user_avatar/forum.knime.com/quaeler/32/3944_2.png) [@quaeler](https://forum.knime.com/u/quaeler)\
**Post date:** [July 27, 2019, 8:43pm UTC](https://forum.knime.com/t/reduce-filter-the-number-of-words-in-rows/17205/4 "2019-07-27T20:43:58Z")

</div>

[trunc.knwf](https://forum-cdn.knime.com/uploads/default/original/2X/b/b1372ac8314560078f213114b92387823349b6af.knwf) (5.7 KB)

---

<div class="post-metadata">

**Author:** ![umutcankurt](https://forum-cdn.knime.com/user_avatar/forum.knime.com/umutcankurt/32/70644_2.png) [@umutcankurt](https://forum.knime.com/u/umutcankurt)\
**Post date:** [July 27, 2019, 9:45pm UTC](https://forum.knime.com/t/reduce-filter-the-number-of-words-in-rows/17205/5 "2019-07-27T21:45:02Z")

</div>

@quaeler  
Thanks for your help and support. That’s exactly what I wanted.👍

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [August 3, 2019, 9:45pm UTC](https://forum.knime.com/t/reduce-filter-the-number-of-words-in-rows/17205/6 "2019-08-03T21:45:03Z")

</div>

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