#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default 255 truncation




If I copy the source of a particular web page and then paste it in to Excel -
the copy-paste does not work - data is truncated
..

eg paste link in to IE

https://apps.db.ripe.net/whois/searc...07&source=ripe
select all and copy - and paste into spreadsheet A1 (as text) - the data is
truncated.

Paste it in to Word as text - and all data is pasted.

I am aware of the ODBC 255 problem and the changing of
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engi nes\Excel


It seems to have no effect.


(I am pretty sure that I did do this in the past with the same web page and it
worked in Excel OK)



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default 255 truncation

By default, Excel's limit for copy/paste operations is 255 characters.
To work around this I usually enter EditMode (F2) to paste data copied
from web pages (or any other content containing html/php). Sometimes,
I'll paste in Notepad first, then edit as required, then copy/paste to
a cell AFTER entering EditMode.

Any sheets being copied also lose any characters beyond the 255 limit.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,045
Default 255 truncation

On Fri, 18 May 2012 13:03:36 -0400, GS wrote:

By default, Excel's limit for copy/paste operations is 255 characters.
To work around this I usually enter EditMode (F2) to paste data copied
from web pages (or any other content containing html/php). Sometimes,
I'll paste in Notepad first, then edit as required, then copy/paste to
a cell AFTER entering EditMode.

Any sheets being copied also lose any characters beyond the 255 limit.


I believe there is something different going on, because there seems to be a great deal of variability in the results of copy/paste operations when the source is a web page. There's clearly something I am not understanding.

If I navigate to that page using FireFox, select "all", then copy/paste into Excel, everything gets pasted in: although as text all on one line; but it is almost 6000 characters.
If I try this from IE9, I get a one line string of 521 characters. However, if I paste into a single cell, I get a string of 5555 characters.
If I "view source" in IE, and select all/copy/paste into Excel, I get 118 lines with 6216 characters.
If I do the same but paste it into a single cell in Excel, I see a string with 6388 characters.
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default 255 truncation

Ron Rosenfeld formulated the question :
On Fri, 18 May 2012 13:03:36 -0400, GS wrote:

By default, Excel's limit for copy/paste operations is 255 characters.
To work around this I usually enter EditMode (F2) to paste data copied
from web pages (or any other content containing html/php). Sometimes,
I'll paste in Notepad first, then edit as required, then copy/paste to
a cell AFTER entering EditMode.

Any sheets being copied also lose any characters beyond the 255 limit.


I believe there is something different going on, because there seems to be a
great deal of variability in the results of copy/paste operations when the
source is a web page. There's clearly something I am not understanding.

If I navigate to that page using FireFox, select "all", then copy/paste into
Excel, everything gets pasted in: although as text all on one line; but it is
almost 6000 characters. If I try this from IE9, I get a one line string of
521 characters. However, if I paste into a single cell, I get a string of
5555 characters. If I "view source" in IE, and select all/copy/paste into
Excel, I get 118 lines with 6216 characters. If I do the same but paste it
into a single cell in Excel, I see a string with 6388 characters.


Now that's interesting! My experience with copying data from a web page
is rather limited, being mostly manually grabbing 'tabled/delimited'
data which 'usually' parses into rows/cols outside EditMode. Everything
else gets handled as I described, otherwise, unless dumping the data
into an array to be further processed before writing to a worksheet.

However.., I've never experienced a copy/paste process than carries
over more than 255 chars from cells. I suspect the issue here is how
the data gets into the cells, and so is why I shared my 'intermediate
step' workaround (which usually doesn't give me any surprise
results).<g

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 255 truncation

On Fri, 18 May 2012 13:03:36 -0400, GS wrote:

By default, Excel's limit for copy/paste operations is 255 characters.
To work around this I usually enter EditMode (F2) to paste data copied
from web pages (or any other content containing html/php). Sometimes,
I'll paste in Notepad first, then edit as required, then copy/paste to
a cell AFTER entering EditMode.

Any sheets being copied also lose any characters beyond the 255 limit.




BUT - I have definitely posted similar web pages in the past - both manually
and also in VBA - I wonder if I was entering edit/mode without knowing.

Anyway - cheers I will give it a go.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default 255 truncation

There's one method that I use to copy more than 255 chars from one cell
to another; I put the SourceCell.Text into a variable and set the
TargetCell.Value property to the contents of the variable.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default 255 truncation

On Fri, 18 May 2012 13:33:24 -0400, Ron Rosenfeld wrote:

On Fri, 18 May 2012 13:03:36 -0400, GS wrote:

By default, Excel's limit for copy/paste operations is 255 characters.
To work around this I usually enter EditMode (F2) to paste data copied
from web pages (or any other content containing html/php). Sometimes,
I'll paste in Notepad first, then edit as required, then copy/paste to
a cell AFTER entering EditMode.

Any sheets being copied also lose any characters beyond the 255 limit.


I believe there is something different going on, because there seems to be a great deal of variability in the results of copy/paste operations when the source is a web page. There's clearly something I am not understanding.

If I navigate to that page using FireFox, select "all", then copy/paste into Excel, everything gets pasted in: although as text all on one line; but it is almost 6000 characters.
If I try this from IE9, I get a one line string of 521 characters. However, if I paste into a single cell, I get a string of 5555 characters.
If I "view source" in IE, and select all/copy/paste into Excel, I get 118 lines with 6216 characters.
If I do the same but paste it into a single cell in Excel, I see a string with 6388 characters.




I agree - and as I said - I think that something has changed recently.

I had a set of macros which worked fine. I did a totally clean install of W7,
IE9, and Excel 2007 and the macros stopped working.

When I investigated further I found that I could not even do the operation
manually.


(Sorry - what is difference between 3rd and 4th example - what is active cell
in 3rd - or do you mean Word ?)

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default 255 truncation

<FWIW
I started using a manual selection with 'Copy' from the right-click
popup menu because all other methods returned either unreliable, weird,
or otherwise unexpected results regardless of what browser I used.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,045
Default 255 truncation

On Fri, 18 May 2012 19:28:18 +0100, mouser wrote:

(Sorry - what is difference between 3rd and 4th example - what is active cell
in 3rd - or do you mean Word ?)


In third example, I have an active cell selected. E.g. I navigate to A1, and then paste. Each line in the source goes into a separate row of the workbook.

In fourth example, I select A1 and then place cursor in the function bar (above the worksheet proper), and then "paste". All of the source goes into A1.
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
Print truncation sbweid Excel Discussion (Misc queries) 0 November 8th 05 04:25 PM
File truncation with VBA crazybass2 Excel Programming 3 August 23rd 05 06:28 PM
truncation problem mbk141[_2_] Excel Programming 0 October 27th 04 02:51 PM
truncation problem mbk141 Excel Programming 2 October 27th 04 03:39 AM
string truncation ljorn Excel Programming 0 September 11th 03 02:23 PM


All times are GMT +1. The time now is 09:16 AM.

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

About Us

"It's about Microsoft Excel"