Solved

Paste HTML into Excel INCLUDING COLUMN WIDTHS

Posted on 2011-03-03
3
264 Views
Last Modified: 2012-05-11
I have set this at 250 point because it is not too important to me, and because I don't have much time to devote to the problem.  But, if somebody has an easy solution that does a good job I will bump points to 500.


When pasting HTML into a spreadsheet, Excel does a pretty good job of honoring HTML formatting.

The big exception is column widths which Excel simply ignores.

In a certain way, this makes sense because internet browsers also tend to "ignore" column width.  When HTML is rendered on a high resolution display, it will look totally different than when it is squeezed into a low resolution display.  Luckily, I hardly ever care what the pasted data looks like, but sometimes I spend a fair amout of time adjusting column widths manually to make things look better.


Does anybody have any nifty tricks that will do this more or less automatically?  
0
Comment
Question by:rberke
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
SiddharthRout earned 250 total points
Comment Utility
Unfortunately there is no inbuilt method to do that or maybe I am not aware of it. I will share what I usually do. After pasting, I select all the cell in the worksheet and then I expand any one of the columns. This expands the columns for the rest as well. I repeat the same with rows. Once done I simply double click between the column headers or Row headers and Excel automatically auto fits them for me. If anything is still left, then I manually do it.

Sid
0
 
LVL 5

Author Comment

by:rberke
Comment Utility
And I will share what I usually do:  After pasting html to Excel, I select the entire sheet and turn text wrapping off and autosize all rows.  

I then go back to the source website, and use Snagit (or similar screenshot software) to cut a picture of the webpage the way it really looks.  

I return to excel and paste that picture onto the spreadsheet and resize picture to be about the "right" size.

I then start on the leftmost column and drag it to match the picture's first column. I then drag the second column to match etc.

I then "eyeball" the spread sheet and turn wrapping back on to whichever columns seem to need it.

Quite a pain the you-know-what.

rberke
0
 
LVL 5

Author Closing Comment

by:rberke
Comment Utility
The portion of the solution that is "complete" is the portion that says there is no builit in tricks, other than the tricks we all have already been using.

So I am closing the question to keep it from laying around.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now