Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
The Crimson Guard


 
* *

Recent

Teamspeak

Loading... Progress
Need Voice Comms? 

User

Welcome, Guest. Please login or register.
Did you miss your activation email?
October 20, 2017, 08:26:33 PM

Login with username, password and session length
Pages: [1]   Go Down
  Print  
Author Topic: Excel script for formatting tables for this forum  (Read 707 times)
0 Members and 1 Guest are viewing this topic.
eldrichgaiman
Guild Member
Newbie
*
Offline Offline

Posts: 8



« on: April 29, 2014, 08:41:23 AM »

First, I apologize if this is a waste of bandwidth, or if there are better tools than these. Blame it on my n00bulousness.

I threw together some VBA code so I could easily copy tables directly from Excel and post them here. It currently supports text color, horizontal alignment, hyperlinks, bold, italic, underline, and strikethrough.

I used it to make this, as an example, my current ESO woodworking:
Bow
Frost
Lightning
Fire
Healing
Shields
Powered
X
X
Sturdy
Charged
X
Impenetrable
X
Precise
X
Reinforced
.
Infused
.
.
X
Well-fitted
Defending
X
X
X
Training
Training
X
Infused
Sharpened
X
X
X
Exploration
X
Weighted
X
Divines

If you're not familiar with macros, then I strongly discourage you to go about downloading and installing macros that you find on the internet. That said, this one won't steal your credit card information or anything. The process for installation is as follows:
  • Download Forum.bas from my Google Drive or attached to this post.
  • In Excel, press Alt+F8 to open the macro menu.
  • If there are macros listed, then you might want to ask someone who knows more to help you at this point.
  • Enter any name like "foo" in the "Macro Name" field at the top and click 'Create'. This will open the macro editor in a new window.
  • Delete the code stub that looks like "Sub foo() ... End Sub"
  • Click on "File"->"Import File" or press Ctrl+M to import a file. Select "forum.bas" from wherever you download it to, and click "Open".
  • Click save and close this window.

This will add the macro to this workbook. If you want it to work on every spreadsheet you own, then Google "PERSONAL.XLSB" for instructions on how to unhide the default book, add the macro, and re-hide it again so that Excel always loads them.

It is convenient at this point to bind the macro to a shortcut key. To do so:
  • In Excel, press Alt+F8 again to bring up the list of macros.
  • You should see two listed there now. Highlight the one that's called "CopyForForum" and click "Options".
  • Enter a shortcut key and click "Ok". I used 'm' since it was otherwise not in use.
  • Close the macro list and try it out.

Using the macro is easy. Simply select the cells you want to copy (only single rectangular selections are supported--not multiple selections) and then run the macro by either using the bound key that you set up above or by pressing Alt+F8, selecting "CopyForForum", and clicking "Run". This puts the formatting code directly on your clipboard where it is ready to be pasted into a textbox just like the one I typed this into.

Some notes:
  • It does not ignore empty rows or columns, so if you select more than you want to copy, it will include empty cell tables.
  • It does ignore formatting in empty cells, so you can't format empty cells in Excel and then add text manually without the formatting being dropped during the copy.
  • It does not handle merged cells in any way. Feeding it merged cells is not advisable, as this was not a consideration and has not been tested.
  • This is very young code, and therefore may contain undiscovered bugs.
  • The contents of each cell contain no formula information, only the result of the calculation exactly as it is displayed by Excel. This includes any formatting of values (fixed decimal points, parenthetical negatives, etc.).
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

 
*BoldItalicizedInsert ImageInsert Quote
* Smiley Wink Cheesy Grin Angry
Last 6 Shouts:
September 04, 2016, 01:28:32 PM
Wink Thespian - I am lucky I got me one of those! Tongue
August 23, 2016, 10:24:50 PM
Summer sux w/o a Racy women at your side
July 20, 2016, 08:39:04 AM
Hey y'all!! Hope everyone is having an Awesome summer!!!
July 06, 2015, 07:06:32 AM
Ha! Ark, eh? I played a little bit, neat little game! Jules is still playing it a lot. Smiley I've been dabbling in TSW, SWTOR and NW
June 09, 2015, 06:05:40 PM
I am there with you Ianhawk also playing a lot of RUST
June 09, 2015, 08:34:06 AM
Addicted to now playing Ark Survival evolved.
Show 50 latest

Stats

Members
Stats
  • Total Posts: 15372
  • Total Topics: 1845
  • Online Today: 7
  • Online Ever: 51
  • (February 27, 2013, 01:50:06 PM)
Users Online
Users: 0
Guests: 2
Total: 2

RSS GW2 Blog

TinyPortal v1.0 beta 4 © Bloc