• (disco)
    spn.innerHTML = "";
    
  • (disco)

    Just looking at the definition of arBlank makes me cringe inside.

  • (disco)

    If only the Microsoft guys wouldn't have thought the Range object methods Clear and ClearContents were superfluous after Excel 2000.

  • (disco)

    This code needs the loving care of an axe.

  • (disco)

    The code is a bit un-enterprisey. Better would be

    for (var i=1; i<=50; i++) {
    for (var j="A"; j<="N"; j++) {
       arBlank = [
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""],
          ["", "", "", "", "", "", "", "", "", "", "", "", "", ""]
       ];
    };};
    
  • (disco) in reply to LB_

    I"m not too hep on VBA and Excel, but I'm guessing this could be done with one line by specifying a range?

  • (disco) in reply to george_gonzalez

    Did you mean to reply to me? I don't understand if so.

  • (disco)

    Looks like someone's first Node.JS code. Am I right, @accalia? :D

  • (disco) in reply to Yamikuronue

    :mask:

    icky icky!

  • (disco) in reply to Yamikuronue
    Yamikuronue:
    Looks like someone's first Node.JS code.

    I'm pretty sure my work on vote isn't that bad! I hope…

  • (disco) in reply to PWolff
    PWolff:
    If only the Microsoft guys wouldn't have thought the Range object methods Clear and ClearContents were superfluous after Excel 2000.
    Fortunately my copy of Excel 2007 (I'm at work at the moment) is one of those ones that by a freakish accident somehow still has them. By an incredible coincidence, I'm willing to bet that if I check my home copy of Excel 2016, it will too. I'm just lucky, I guess.
  • (disco)

    She probably got bored. I mean, JS + Excel? If it was me you would have found my brains splattered on the ceiling.

  • (disco) in reply to Scarlet_Manuka

    Sorry, I ran short of irony tags.

  • (disco) in reply to george_gonzalez

    You're perfectly right.

    That's btw my thought when I scanned the methods of the Range class for some meaningful name and found Clear and ClearContents which do exactly as their names suggest. Took me ~ 1/10 of the time to copy-paste compose my code suggestion.

  • (disco) in reply to Eldelshell
    Eldelshell:
    I mean, JS + Excel?

    Yes, it's yet another way to do Excel automation apart from VBA, Office Interop and Visual Studio Tools for Office (VSTO). The key difference is that these add-ins can also run in Excel on the Web.

  • (disco) in reply to PWolff
    PWolff:
    Sorry, I ran short of irony tags.

    Jokes are supposed to be funny.

    Try to not trigger Poe's Law, because the default assumption is idiot not troll.

  • (disco) in reply to PWolff
    PWolff:
    Sorry, I ran short of irony tags.
    Meh, I was trying to play along, but I don't think it worked all that well. But :barrier: to :postbox: and all that.
  • Multihuntr (unregistered) in reply to LB_

    I really like how they keep setting spn.innerHTML = ""

    As if it was going to somehow change while they weren't looking.

Leave a comment on “Mid-Stream Switch”

Log In or post as a guest

Replying to comment #:

« Return to Article