Remove extra space in Talend outputexcelfile - talend

In Talend:I am trying to remove the extra space in Texceloutputfile. Attached the example in below image.

you might have special charater \t in your string.
try to remove \t using replace function in tmap or use tReplace component to remove \t.

Related

How to avoid multiple spaces in textfields?

Is there a way to stop the use of more than 1 space in a row in a textfield?.
Currently I am using this code to deal with a single space, but I don't want to end up with an infinitely long list of exceptions like the second image.
I do want to use spaces, just not at the start of my text or multiple spaces in a row.
Thank you in advance.
You could use trimRight() to strip all leading whitespace from your value.
If you want to deal with trailing whitespace as well, you could just use trim()
Either way, both of these would catch all the exceptions you listed, whether there is an empty value, or a value with only whitespace.
I'm unsure if you are asking how to also replace multiple spaces inside the string with just single space? To do that you can use a regex, like this:
value = value.trim();
var singleSpaces = value.replaceAll(RegExp(r"\s+"), " ");

TinyMCE converting space to

I am using TinyMCE 4 and in that, if I insert a space in the textarea between two word or characters and then check the source, the space converted to .
I have tried this solution, but that only resolves the issue partially. This is because, if I enter a single space between two characters or words, then TinyMCE doesn't add , but if I add two consecutive spaces between two characters or words, then it makes the second space .
Any work around on this?
TinyMCE is adding hard spaces when you type multiple spaces into the editor - HTML does not show multiple normal whitespace characters so you can't get (per your example) two spaces between letters with just regular spaces. Using hard spaces for every other space allows content authors to use spaces within content and get a rendered result that matches what they type in the editor.
If you render that HTML without hard spaces there would just be one space between each set of characters regardless of how many spaces you put in the HTML source.
The net is that the editor is doing what it needs to do to allow you to see multiple spaces.

I want to remove the space and special characters between the a records,

Actual Record
"102","kal12 3# ","18009","10009","29","HR","del"
What I want (Expecting record)
"102","kal123","18009","10009","29","HR","del"
For above scenario,If you see the record "kal12 3#" which is actual record but I want transform the record as like "kal123" I were used "StringHandling.CHANGE("hello world!","world","guy")" function for remove the special characters and for space removing used StringHandling.TRIM(" hellow world! ")
But I want to remove the space and special characters at a time,so can anyone please help me to resolve this issue.
I am Using Talend open studio
Thanks& Regards,
Naresh
Supposing the field name is row1.myField, try this in a tMap:row1.myField.replaceAll("[# ]", "")
You just have to include each character you want to remove from row1.myField between the square brackets.
Hope this helps.
TRF

Finding the format of arbitrary delimited text file in MATLAB

I have a file that looks like this in notepad++
I can easily see the spaces (being the orange dots), and tabs (being the orange arrows). I can also right click this in MATLAB and import it in a variety of ways. The problem is firstly the delimiters are not consistent. It seems to go TAB then some spaces to make sure the total field equals 6 characters...
The only way I understand reading a file in is if you already know how it is delimited. But in this case I would like to parse each line so MATLAB has some 'token' of what goes where eg:
Line1: Text Space Text Space Text Tab Space Space Text NEWLINE
(Notepad++ seems to know just fine so surely MATLAB can get this info too?).
Is this possible? Then it would be nice to use this information to save the imported data back out to a file with exactly the same formatting.
The data is below. For some reason copying this into notepad++ does not preserve its delimiting, you will need to add the tabs in yourself so it looks like the file in the screenshot.
Average Counts : 56.2
Time : 120
Thanks
If you use textscan, the default behaviour should probably suit your needs:
Within each row of data, the default field delimiter is white space. White space can be any combination of space (' '), backspace ('\b'), or tab ('\t') characters. If you do not specify a delimiter, textscan interprets repeated white-space characters as a single delimiter.
The output is a cell array, where each column is saved as a cell. So C{1} would contain the strings, C{2} the colons, and C{2} the values.

Split a string in SSRS if there is a space in between words

I have a field with multiple words in it. I want to separate the words onto different lines rather than have them separated by spaces.
So for example “Not Great”, I want to put “Not” on 1st line and “Great” on 2nd line, like so:
Not
Great
There could be words with “/” character in between i.e. “Great / Good” where I want to put everything after 1st word in 2nd line and everything after “/” in 3rd line i.e.
Great
/
Good
Basically, whenever there is space, I want split that string into multiple lines. How do I do that in SSRS?
Ok, you want the string broken up into different lines.
Do you mean on separate lines within the same tablix cell?
Thats straightfoward see
http://www.kodyaz.com/articles/reporting-services-add-line-break-between-words-custom-code.aspx
If you mean to split the string so the words are on different Tablix cells one approach would be to use a sub report on a list.
Set the list data set to the original data set containing the multiple word string, pass the string to the sub report as a parameter.
On the sub report pass the parameter to a data set that splits the string into individual lines.
Losts of suggestions for how to do that here
Turning a Comma Separated string into individual rows
Simply replace the space with a carriage return and line feed:
=Replace(Fields!SomeWords.Value, " ", vbCrLf)
=Fields!SomeFields.Value.Replace(Space(1), vbCrLf)