Loading Excel values to Teradata - excel

The Excel file I am using has cells which contains multiple lines typed in by using Alt+Enter. When this Excel is load into teradata, these multiple lines in single cell should reflect in single cell in the teradata table also. But instead, it is getting loaded as several rows. How to rectify this?

Go to Find & Replace (aka Ctrl+H). Type Ctrl+J in the Find what: text box and put a space or some alternate character in the Replace with: text box. Make sure that the Match entire cell contents is not active and click Replace All.
This effectively changes all instances of line feeds (aka CHAR(10), vbLF or ASCII 0010) into spaces. If spaces will not suit your purposes, choose another character or text string.

Related

Link multiple cells from Excel to Word without inserting line break

I have a Word doc in which I'm inserting links to an Excel file. For single Excel cells I can use Paste Special>Paste Link>Unformatted Text to link to just the cell contents. However, sometimes I want to link multiple cells laid out as a table in Word.
If I copy the cell range I want and then use Paste>Link & Use Destination Styles or Paste>Link & Keep Source Formatting, a line break gets inserted above the table, which I do not want but can't get rid of as it's part of the linked field. If I use the unformatted text option, I lose the basic table layout. None of the Paste Special options seem to work for this.
The only workaround I can think of is to link as unformatted text each cell in the table individually, but with sometimes hundreds of cells, that's not really an option. Help! What can I do?
(One reason I am having trouble with the line break above is that I'm trying to use Insert Caption with the tables thus linked, but when I do, the resultant caption gets incorporated into the linked field, and so when I update fields, the caption disappears since it's not in Excel... workarounds for that would help too.)
I am using Microsoft Office Professional Plus 2016.
[EDIT: Example here!]
Word doc:
Linked Excel sheet (Cells A1:C3):
If I highlight some or all of the table and Update Link, the caption disappears:
And when my cursor is at the line break above the table, the table fields highlight as that line break is somehow considered part of the linked field:
I think you just need to add a space before the line break to make sure the caption is not within the linked field. Look at difference between the two example below:
Cursor is now placed just before the line break. The values are highlighted, indicating that the linked field is selected:
Now there's a space between the cursor and the line break. The values are not highlighted, so you can safely insert a captino here:

Save or Export Excel as csv with commas in cell values

My Excel has a block with a comma , eg. abcd,xyz.
When I convert this Excel to CSV, this text gets converted as 2 columns.
Can anyone advise how I can prevent this?
Excel by default will use a comma as the delimiter, but you can change that:
Go to Control Panel > "Region and Language" (Or just "Region" in Windows 10), and then click the "Additional settings" button on the bottom.
Now look very closely at the List separator item, which normally
has a comma in the field, and for the purposes of this illustration,
change it to a Pipe | character.
Once you hit Apply, and then save your Excel file as a CSV file, you’ll notice that your file now has pipe | characters as the delimiter.
PS: You'll probably want to change the List separator back to a comma just in case some other application needs it.

How to remove invisible line break character

I have big data at excel, and some cells contains html codes. These cells have line breaks in them. I tried to replace line breaks (Alt+010, \n) but excel said there is no char like this.
When I copied cell to notepad, there is no line break.
When I copied from notepad to phpmyadmin sql area or textpad, I see line breaks again.
There are notepad, textpad and phpmyadmin sql area screenshots below. How can I remove these invisible line breaks?
This could be a problem with Carriage Return + Line Feed. When you press Alt+Enter in Excel it only incerts a Line Feed. But if you somehow get both Carriage Return + Line Feed in a cell that could leed to additional problems. See this page for solutions:
https://www.ablebits.com/office-addins-blog/2013/12/03/remove-carriage-returns-excel/
Did you try to remove any unnecessary tab within the code? Also check for some trivial things like e.g string max length in your mysql database or editor's miscellaneous settings.
EDIT. oh, I forgot. It may be also caused by your language settings, check for default database's regional coding preset and if Turkish is currently supported.
Line breaks - do you mean the line breaks you could introduce in Excel with ALT+ENTER?
Then you could use Search / Replace option in Excel without need to copy your content to another tool:
Open it and introduce in Search for CTRL+J (you will receive a point displayed in the search field).
In Replace you could introduce what you want (nothing, a space, a semicolon, ...).
Select Replace all.
EDIT:
I've tested it by copying html from textpad to one cell using clipboard. With this the method described by me is not working.
But there is another solution: Open replace command, for "search string" introduce ALT-Key (keep it pressed), then introduce by using the numeric key pad (on the right side of a "standard" keyboard) the tree digits 0 1 0 and finally release ALT-Key (you will see a point displayed in the search field). Choose as replacement string what you want and choose replace all.
Function =clean() helped me. Find/replace with ALT+J worked to replace, but did not fully deleted all the invisible characters in the string, so the cell was still misbehaving with text in columns. The =clean() function finally removed all the invisible characters left there.

Character debug in Excel

I'm using Excel's Get & Transform to get data from a text file. The problem is that the textfile has special characters and those are not correctly displayed. So I have a sheet with this data, and I have also imported one with the character debug list, which shows e.g. that À should be À.
The only option I see is "replace values" which requires me to go in manually and change each of the 128 characters. Is there any way to replace all the special characters using the character debug list?
Or any other way to do it?
Thanks :)

How to import a text log file into a excel columns

I have some data of form
[39645961,-79966658]358920045121212[0.75]2013-01-30 20:47:52
[39646124,-79966771]358920045121212[0.5]2013-01-30 20:47:54
[39646134,-79966733]358920045121212[0.5]2013-01-30 20:47:56
[39646123,-79966723]358920045121212[0.5]2013-01-30 20:47:58
[39646144,-79966724]358920045121212[0.5]2013-01-30 20:48:09
......
How can I import them into an excel file into separate columns. like
39645961 -79966658 358920045121212 0.75 2013-01-30 20:47:52
39646124 -79966771 358920045121212 0.5 2013-01-30 20:47:54
39646134 -79966733 358920045121212 0.5 2013-01-30 20:47:5
Any ideas?
If it's not too frequent task:
Copy-paste the text to Excel (will occupy one column)
Data - Text to Columns (Excel 2003)
Delimiters: Comma and Other: ]
After completing the operations, insert a column after the remaining non-splitted fragment (358920045121212[0.75) and repeat Text to Columns for this column only with Other delimiter as [.
1) Copy the data into a text file, like Notepad.
2) Use find and replace to replace bracket characters with a tab character.
You can not directly type a tab character into the replace field, because it will just move your cursor to the next field. To get around this:
Open another Notepad window and press tab, then copy the tab into the replace field of the original Notepad window. Hit replace and repeat this process with space and comma characters.
3) Save and close the notepad file.
4) Open the notepad file in Excel. (choose file, open, and don't forget to change the file type in the open dialog from "All Excel Files" to "All Files"
5) This will open the Text Import Wizard. Hit next, next and finished, and the data should show up in separate columns
If you want to do it strictly in Excel, you will have to extract the individual data elements from each string using a combination of text functions, including SEARCH or FIND, LEFT, MID and RIGHT. The following formulas show one wqy to extract each element from one of the strings, which I have assumed is in A1.
=MID(A1,2,SEARCH(",",A1)-2)
=MID(A1,SEARCH(",",A1)+1,SEARCH("]",A1)-SEARCH(",",A1)-1)
=MID(A1,SEARCH("]",A1)+1,SEARCH("]",A1)+SEARCH("[",MID(A1,SEARCH("]",A1),99))-SEARCH("]",A1)-2)
=MID(A1,SEARCH("[",A1,2)+1,SEARCH("]",MID(A1,SEARCH("[",A1,2)+1,99))-1)
=MID(A1,SEARCH("????-??-??",A1),10)
=RIGHT(A1,8)
You would enter these formulas horizontally to the right of A1, then copy them down.
There is a much simpler way - use a third party piece of software.
The one I used costs me very little for the year, but means i don't need to mess around with trying to get it right.
Its the only tool i found which isn't a monthly subscription as well.
Its a desktop based application.
https://onpage.rocks/product/server-log-tool/

Resources