Skip to main content
simply more productive
The Data Specialist

✅ Easy data integration - import/export
✅ No programming required thanks to visual modeling
✅ Simple ETL tool with versatile options

Flowheater Chart

Removal of unprintable characters

  • FlowHeater-Team
  • avatar Topic Author
  • Offline
  • Admin
  • Admin
More
15 years 8 months ago #2075 by FlowHeater-Team
Removal of unprintable characters was created by FlowHeater-Team
Translated submission in the German forum. You can read the original entry here: Entfernen von nicht druckbaren Zeichen .

Hi,

I regularly import Excel files which contain characters that cannot be printed. Is there some way to eliminate these with FlowHeater during an import? There is a "clean up" function in Excel, but due to the large number of rows, the use of this function is not practical for me.

Best regards,
Achim Federle

Best wishes
Robert Stark

Please Log in or Create an account to join the conversation.

  • FlowHeater-Team
  • avatar Topic Author
  • Offline
  • Admin
  • Admin
More
15 years 8 months ago #2076 by FlowHeater-Team
Replied by FlowHeater-Team on topic Re:Removal of unprintable characters
Hi Achim,

You can achieve this using the .NET Script Heater along with the script I have written below.

You have to drag a .NET Script Heater on the Designer window for each individual Excel field that could possibly contain unprintable characters. Then copy the script below into the Heater configuration and connect the incoming field to the .NET Script Heater as well as its output to the relevant field on the WRITE side.
This script filters the characters of the incoming string. I think it should work for the most frequently used characters.
Code:
public object DoWork() { object invalue = InValues[0].GetValue(); if (invalue == null) return invalue; string replace_with = ""; // = remove from string // string replace_with = " "; // = replace with space // add additional characters here string special_character= "\t\n\r\\[\\]!ß´#\"$§%&' ()*+€,-./:;<=>?@\\^_`{|}~"; Regex myRegex = new Regex(@"[^\w\d" + special_character + "]"); return myRegex.Replace((string)invalue, replace_with); }

At present it passes through:
- all letters and numbers
- most special characters (see comments in the script)

If some special characters are eliminated that should not be replaced/removed, you just need to add those characters to the list of special characters in the script, between the quote marks (see the comments in the script).

Note: This script makes use of regular expressions (Regex) and hence is only supported by FlowHeater versions 1.2.6 and above.

Best wishes
Robert Stark

Please Log in or Create an account to join the conversation.

Time to create page: 0.134 seconds
FlowHeater Logo
FlowHeater - The Data Specialist
Efficient data integration and transformation with FlowHeater – the perfect solution for a seamless transfer of your data.
Legal information
Support & Contact
Contact

Phone:
0951 / 9933 9792

eMail:
info@flowheater.net


Copyright © 2009-2026 by FlowHeater GmbH. All rights reserved.