Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default question on horizontal tab

Hello,

When putting a string into a clipboard (which can be later pasted into
Excel), what do I need to use to represent the horizontal tab? I
thought "\t" is the answer, but it doesn't work. It shows as a square
box instead of splitting data into multiple columns. Thank you!

--
wcc

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default question on horizontal tab

Try formatting the cell: Format | Cells -Alignment and check the "Wrap
Text" box
I assume the "/t" is correctly inserting a CHAR(10)
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"wcc" wrote in message
ups.com...
Hello,

When putting a string into a clipboard (which can be later pasted into
Excel), what do I need to use to represent the horizontal tab? I
thought "\t" is the answer, but it doesn't work. It shows as a square
box instead of splitting data into multiple columns. Thank you!

--
wcc



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default question on horizontal tab

Thanks Bernard. I'm afraid I didn't explain my question clearly.
Suppose I want to paste string "1" & "2" into cell A1 and B1. If I have
"1\t2" in the clipboard, in cell A1 if I press Ctrl+V to paste, instead
of putting "1" in cell A1 and "2" in cell B1, Excel will put a string
"1 2" into cell A1, between "1" and "2" is a rectangular box. I think
CHAR(10) is "\n" which is for new-line, not a tab.

Btw, on the other hand, if I have "1\r2" or "1\n2" in clipboard, Excel
will place "1" and "2" in two adjacent cells, on above the other.

Thanks.

--
wcc

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default question on horizontal tab

Do you know about Data | Text to Columns ?
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"wcc" wrote in message
ps.com...
Thanks Bernard. I'm afraid I didn't explain my question clearly.
Suppose I want to paste string "1" & "2" into cell A1 and B1. If I have
"1\t2" in the clipboard, in cell A1 if I press Ctrl+V to paste, instead
of putting "1" in cell A1 and "2" in cell B1, Excel will put a string
"1 2" into cell A1, between "1" and "2" is a rectangular box. I think
CHAR(10) is "\n" which is for new-line, not a tab.

Btw, on the other hand, if I have "1\r2" or "1\n2" in clipboard, Excel
will place "1" and "2" in two adjacent cells, on above the other.

Thanks.

--
wcc



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default question on horizontal tab

I didn't know about Text to Columns, but it works for my purpose. Thank
you Bernard.

--
wcc



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default question on horizontal tab

Not sure how this content is being put in the clipboard, and I assume "1\r2"
relates to RTF...

The clipboard can hold different items simultaneously, but only one of each
format.
If you copy Rich Text Format text, that format will be available, as well as
a text version of the same.
Pasting into another environment that support RTF will take that format, but
into one that does not support RTF (sat NotePad) will paste the text
version.

So if you place the string "1\t2" on the clipboard, it will be as text and
hence unformatted.
(I get the same for "1\r2" and "1\n2" also.)

So depends if these values are put on the clipboard as RTF or text.

NickHK
By the way you can use the clipbrd.exe to view the values on the clipboard
and save the clipboard to view in a text editor, to what you actually have.


"wcc" wrote in message
ps.com...
Thanks Bernard. I'm afraid I didn't explain my question clearly.
Suppose I want to paste string "1" & "2" into cell A1 and B1. If I have
"1\t2" in the clipboard, in cell A1 if I press Ctrl+V to paste, instead
of putting "1" in cell A1 and "2" in cell B1, Excel will put a string
"1 2" into cell A1, between "1" and "2" is a rectangular box. I think
CHAR(10) is "\n" which is for new-line, not a tab.

Btw, on the other hand, if I have "1\r2" or "1\n2" in clipboard, Excel
will place "1" and "2" in two adjacent cells, on above the other.

Thanks.

--
wcc



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Complicated question adding extra horizontal lines Meenie Charts and Charting in Excel 2 June 19th 09 08:14 PM
The real Horizontal Formula question Melissa in Salem Excel Discussion (Misc queries) 4 June 14th 09 02:06 AM
question on horizontal line on chart Meenie Charts and Charting in Excel 0 April 21st 09 04:24 PM
Horizontal sort?? wonderingAboutExcel Excel Programming 1 January 3rd 06 01:05 PM
No Horizontal Scroll Bar Screen/Display size Excel Discussion (Misc queries) 1 August 19th 05 02:49 PM


All times are GMT +1. The time now is 03:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"