I have a table in HTML having cells storing numbers like 123.0,123.00. When I use ctrl-A to copy the whole page into excel, 123.0 and 123.00 are all changed to 123, which is not something I want to have.

How can I disable/stop all the pre-formatting operation in excel when I am pasting an HTML table to it? Thanks.

link|improve this question

53% accept rate
feedback

1 Answer

up vote 1 down vote accepted

I don't think you can stop it from trying to fit the text into the existing formatting of the cell. I tried using Paste Special which usually gives you a bit more flexibility, but even pasting it as Text resulted in the loss of the decimals. With the format of the cell set as General it will hide them.

You can "preset" a block of cells to have the Number formatting (select all of them, right click, click Format Cells..., paste in the data and click the little clipboard icon next to the pasted range, selecting Match Destination Formatting.

enter image description here

link|improve this answer
I tried your method, it works partly, if I choose "number" in the "Format Cells...", the "123.0" is changed to "123", but if I choose "text", it will be OK. Thanks again. – lokheart Dec 6 '11 at 2:09
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.