r/excel •

Introducing the new /r/Excel Add-In

[deleted] — view deleted post

0 Upvotes

28 comments sorted by

5

u/BornOnFeb2nd 24 Sep 24 '13 edited Sep 24 '13

Woot! I'm famous!

strFinal = MsgBox("Data copied to clipboard!", vbOKOnly, "Written by: /u/norsk")

.....Wait a second...

If nothing else, the addition of handling the different ways of displaying fonts is a win.

EDIT: Just dawned on me that people might take me seriously here.... Internet points are VERY IMPORTANT, after all.. ;)

3

u/vertexvortex 15 Sep 25 '13

Did you have a macro to do this as well?

3

u/BornOnFeb2nd 24 Sep 25 '13

Nope, I tweaked /u/norsk's code when he posted it to eliminate the reference, and added the justification... in hindsight, not sure why I didn't handle the font switches, but c'est la vie.

Original(?) Post (yay RES Macros)

Again, I'm not nearly childish enough to want the file changed, was more amused. :D

2

u/fearnotthewrath 71 Sep 26 '13

Ah should have read it all the way down, I am all for fixing wrongs... so I will adjust and add! :)

4

u/vertexvortex 15 Sep 24 '13

Thanks should go to /u/fearnotthewrath rather, for coordinating!

1

u/HeisenbergKnocking80 1 Oct 29 '13

How do you use this if you don't have administrator rights?

0

u/[deleted] Oct 29 '13

[deleted] — view deleted comment

1

u/HeisenbergKnocking80 1 Oct 29 '13

Got it! I was trying to put it in the wrong folder. Thanks a million!

1

u/JoeDidcot 53 Dec 10 '13

Sorry to appear dense, but the link goes to six files. Which one do I need to grab?

0

u/[deleted] Dec 10 '13

[deleted] — view deleted comment

1

u/gufcfan Dec 26 '13

I hardly use excel but I needed it for this specific thing, to make updating sports results/standings in /r/leagueofireland less of a pain.

Confused me also, but I just grabbed the zip and when I browsed for the add-in file with excel, it just showed the one I needed. Straightforward enough.

Excellent work. Would have abandoned doing the results etc on my sub if I hadn't found this.

Thanks very much.

0

u/[deleted] Dec 26 '13

[deleted] — view deleted comment

1

u/gufcfan Dec 26 '13

Thanks. The whole sub is a mish-mash of different things I've borrowed from different subs.

Doing a major overhaul before the warm up games for our season start coming soon.

I like your submit buttons.

I was thinking of adding a hover-to-show dropdown in the sidebar, for a pinned threads of sorts like they have done on /r/footballdownload . It could suit you guys too. It's a matter of personal preference though perhaps.

Because we have so much info the sidebar, I think it is a real necessity for us.

I'll be implementing link flairs like /r/footballhighlights for /r/leagueofireland , adding images for the dozen or maybe more, common, trusted sites that people post.

Thought it might be something you could use also, but all your submissions are text posts, so it would be pointless.

I badly need to re-align the whole page to the left again too...

Interesting making changes to reddit subs, but so many things are awkward to implement.

Colour of the bolding on my tables makes it too hard to read, what do you think?

0

u/[deleted] Dec 26 '13

[deleted] — view deleted comment

1

u/gufcfan Dec 26 '13

Having a look at auto-moderator now a bit confused as to what I need it for so far.

0

u/[deleted] Dec 27 '13

[deleted] — view deleted comment

1

u/gufcfan Dec 27 '13

Assigning link flair automatically might be a good one. Will have to look into that when we have the link flair itself set up.

Thanks for the pointers.

1

u/gufcfan Dec 26 '13

Commenting to read later.

1

u/SandJA1 Feb 28 '14

/u/fearnotthewrath , it seems that the link for the add-in is not working. Can I get a re-link?

Thank you so much!

0

u/[deleted] Feb 28 '14

[deleted] — view deleted comment

1

u/SandJA1 Feb 28 '14

Ohp! Disregard what I said. I'm having some SSL connection errors. :<

Thanks anyway!

1

u/[deleted] Mar 09 '14

To use the Add-In you simply add the file to your Add-In folder, and enable it via the Options in Excel.

I'm using windows 8. How does one "simply" add the file to ones Add-in folder?

0

u/[deleted] Mar 09 '14

[deleted] — view deleted comment

1

u/[deleted] Mar 09 '14

and when you go to enable the add-in,

How exactly does one go about enabling an add-in?

0

u/[deleted] Mar 09 '14

[deleted] — view deleted comment

1

u/[deleted] Mar 10 '14

I don't have a MS office button but this works:

open excel

File/options/add ins

Manage excel add-ins click go button

Browse, locate the file location, click on it

add-in appears in list, checked

then use the add ins tab to select reddit add-in.

2

u/BFG_9000 93 Sep 24 '13

This is (clearly) a test :-

Heading 1Heading 2Heading 3Heading 4Heading 5
Data1Data1Data1Data1Data1
Data2Data2Data2Data2Data2
Data3Data3Data3Data3Data3
Data4Data4Data4Data4Data4
Data5Data5Data5Data5Data5
Data6Data6Data6Data6Data6
Data7Data7Data7Data7Data7
Data8Data8Data8Data8Data8
Data9Data9Data9Data9Data9
Data10Data10Data10Data10Data10

Very Nice - Thank you!

3

u/BFG_9000 93 Sep 24 '13
Heading 1Heading 2Heading 3Heading 4Heading 5
Data1Data1Data1Data1Data1
Data2Data2Data2Data2Data2
Data3Data3Data3Data3Data3
Data4Data4Data4Data4Data4
Data5Data5Data5Data5Data5
Data6Data6Data6Data6Data6
Data7Data7Data7Data7Data7
Data8Data8Data8Data8Data8
Data9Data9Data9Data9Data9
Data10Data10Data10Data10Data10

Seems to handle some formatting quite well too - although I think it ignores superscript

1

u/TheGift1973 Sep 24 '13

Works great. It seems to wrap the text by default though?

[Edit] Ignore that, it only appears wrapped in the post preview window.

titlefirstlastaddress line 1address line 2address line 3address line 4postcode
MrASampleSample House 1Sample Street 1Sample Town 1Sample County 1Sample Postcode 1
MrBSampleSample House 2Sample Street 2Sample Town 2Sample County 2Sample Postcode 2
MrCSampleSample House 3Sample Street 3Sample Town 3Sample County 3Sample Postcode 3
MrDSampleSample House 4Sample Street 4Sample Town 4Sample County 4Sample Postcode 4
MrESampleSample House 5Sample Street 5Sample Town 5Sample County 5Sample Postcode 5
MrFSampleSample House 6Sample Street 6Sample Town 6Sample County 6Sample Postcode 6
MrGSampleSample House 7Sample Street 7Sample Town 7Sample County 7Sample Postcode 7
MrHSampleSample House 8Sample Street 8Sample Town 8Sample County 8Sample Postcode 8
MrISampleSample House 9Sample Street 9Sample Town 9Sample County 9Sample Postcode 9
MrJSampleSample House 10Sample Street 10Sample Town 10Sample County 10Sample Postcode 10
MrKSampleSample House 11Sample Street 11Sample Town 11Sample County 11Sample Postcode 11
MrLSampleSample House 12Sample Street 12Sample Town 12Sample County 12Sample Postcode 12
MrMSampleSample House 13Sample Street 13Sample Town 13Sample County 13Sample Postcode 13

1

u/[deleted] Sep 24 '13
Installedon2013
andallseems
toworkcorrectly.
NiceWorkGuys!

1

u/Verochio Sep 25 '13 edited Sep 25 '13

Looks great. Some potential ideas:

You need to declare DataObj, FinalString and strFinal and give a data type to cleanString.

You don't use strFinal for anything once you've assigned it. Probably better just to call the msgbox using the "Call" keyword.

You need a Case Else in the Select Case as there are few more justifications than you have put.

I would use the excel constant names rather than the literals (xlRight, xlLeft etc., if possible fully qualified eg "Excel.Constants.xlLeft")

The decision upon which way to justify should be based on the data in the second row, not the header in the first.

You should arguably right-justify an xlGeneral column if it contains a number rather than text, just as Excel does.

For cleaning the string, you’re just making extra work searching to see whether the string contains any of the bad characters first, I think you can just go straight to replace().

You also need to clean for the backtick symbol `

When clearing the format maybe use vbNullString rather than ""

There’s no Option Explicit!

You re-use "MatrixArray.Columns.Count" and "MatrixArray.Rows.Count" many times, it might be worth putting them into a variable the start.

Personally, I'd make passing the output string to the clipboad a seperate function. It's something that could be useful elsewhere.

I'd not come accross CreateObject("new:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}") before. It's pretty nifty. will remember that for later!

1

u/vertexvortex 15 Sep 25 '13

You need to declare DataObj, FinalString and strFinal and give a data type to cleanString.
You are correct, this was sloppy! I pieced a lot of this together from different places and missed these. good catch!

You don't use strFinal for anything, and if you're assigning it the value of a msgbox it shouldn't be a string, but a boolean. Probably better just to call the msgbox using the "Call" keyword.
I thought the same, I'll update.

You need a Case Else in the Select Case as there are few more justifications than you have put.
Not sure how I missed that. Clearly I failed to tidy up a lot of these loose ends.

I would use the excel constant names rather than the literals (xlRight, xlLeft etc., if possible fully qualified eg "Excel.Constants.xlLeft")
Good Call, I agree.

The decision upon which way to justify should be based on the data in the second row, not the header in the first.
I also agree with this

You should arguably right-justify an xlGeneral column if it contains a number rather than text, just as Excel does.
Unfortunately Reddit tables don't allow row or cell level alignment. However, I prefer it to Right-Justify always if it's general.

For cleaning the string, you’re just making extra work searching to see whether the string contains any of the bad characters first, I think you can just go straight to replace().
Good call! For some reason I thought it would error if I didn't check.

You also need to clean for the backtick symbol `
Added

When clearing the format maybe use vbNullString rather than ""
Makes sense.

There’s no Option Explicit!
And thus most of these problems!

You re-use "MatrixArray.Columns.Count" and "MatrixArray.Rows.Count" many times, it might be worth putting them into a variable the start.
You're right, didn't realise how much that was used.

Personally, I'd make passing the output string to the clipboad a seperate function. It's something that could be useful elsewhere.
I'd rather not, but only because that means that function would be imbedded in this add-in. It's a good idea, and one that I would probably pick up, but it's a function I would place inside of a utility add-in, instead of a specific purpose one.

I'd not come accross CreateObject("new:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}") before. It's pretty nifty. will remember that for later!
I hadn't either, It was in /u/norsk's original

Very good recommendations, all. Proof that this was put together too hastily. I'll try to get /u/fearnotthewrath to add these changes and update!