Forum Moderators: open

Message Too Old, No Replies

Excel Column to HTML Column

any tricks?

         

c55dax

2:12 am on Mar 9, 2004 (gmt 0)

10+ Year Member



Is there any trick to paste a column of say 300 items from excel into a html editor and have your output end up in column form without having to manually insert a line break into your HTML after each item?

Thanks

TheDave

3:07 am on Mar 9, 2004 (gmt 0)

10+ Year Member



Just add a column after your list, and put your mark-up tags in there as a formula, and copy (drag) down, ie:

..A.....B...........
1¦ListA¦=A1 & "<br>"
2¦ListB¦=B1 & "<br>"
3¦ListC¦=C1 & "<br>"

Then you can just copy and paste column B

If you wanted a table for example you would use:

..A.....B.....................
1¦ListA¦="<tr><td>" & A1 & "</td></tr>"
2¦ListB¦="<tr><td>" & A1 & "</td></tr>"
3¦ListC¦="<tr><td>" & A1 & "</td></tr>"

You would then copy column B, and paste it between your <table> and </table> tags.

edit-

The other way you can do it is without formulas, and just put your html in the cells around your list, and copy and paste that into notepad, and Find/Replace out all tabs, ie:

.¦A.......¦B....¦C..........
1¦<tr><td>¦ListA¦</td></tr>
2¦<tr><td>¦ListB¦</td></tr>
3¦<tr><td>¦ListC¦</td></tr>

Purple Martin

3:28 am on Mar 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



FYI

I've done similar things to convert big lists and tables in MS Word to HTML.

If it's a bulleted/numbered list, just un-bullet/number it.

If it's in a Word table, choose Table > Convert table to text. Use tabs as column delimiters.

Once you've got your list or table in plain text form with line breaks and tabs, you can do a Replace (CTRL+H) on the following:

Find what: ^p
Replace with: </td>^p</tr>^p<tr>^p<td>

Find what: ^t
Replace with: </td>^p<td>

Hint: add spaces to the replace text to get indenting for your HTML.

tedster

4:05 am on Mar 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I also do this from time to time -- it's one of the times I actually like the features in MS Office. Advanced search and replace on hidden formatting characters can be a big time saver.

Just need to be careful that Word doesn't get too helpful and start inserting non-valid characters.