• (cs)

    CRAP Code == Code Responsible for Aram's Puzzlement.

  • (cs)
    Aram got it all re-installed and added to the License Compliance system, but he had one question.

    That is the real WTF. Microsoft Office Licenses specifically prohibit the applications from being used in a Server Environment. This is the biggest reason why Server Applications that must create Office "documents" need to use the OpenXML implementation.

    Adding something to the "License Compliance System" does NOT make something actually comply with legal licensing requirements.

  • (cs)

    I didn't know about the license thing, but I know there is an article on MSDN that recommends against using Office Automation on server-side code, because there is no official support for it and the UI can't be disabled, only hidden.

    It means that there is nothing, nothing, that prevents the automated Office application from displaying (visibly or not) a modal dialog box.

    Some old code of ours (thankfully replaced with OpenXML since) used Word automation and someday was paralyzed by an unforeseen, invisible "spellchecker overloaded by too many spelling errors" modal message box.

    Addendum (2012-11-13 09:17): Duh, the "license thing" is on the page itself:

    Besides the technical problems, you must also consider licensing issues. Current licensing guidelines prevent Office applications from being used on a server to service client requests, unless those clients themselves have licensed copies of Office. Using server-side Automation to provide Office functionality to unlicensed workstations is not covered by the End User License Agreement (EULA).
  • letatio (unregistered) in reply to TheCPUWizard
    TheCPUWizard:
    Aram got it all re-installed and added to the License Compliance system, but he had one question.

    That is the real WTF. Microsoft Office Licenses specifically prohibit the applications from being used in a Server Environment. This is the biggest reason why Server Applications that must create Office "documents" need to use the OpenXML implementation.

    Adding something to the "License Compliance System" does NOT make something actually comply with legal licensing requirements.

    I cringe merely at the thought of Microsoft in a server environment.

  • Smug Unix User (unregistered)

    Just make them connect to a VM on the server technically they are processing on a server rather than a client. Problem solved.

  • Omego2K (unregistered)

    Real men use BIFF

  • foo (unregistered)

    And that's why sane systems implement functionality in a library or batch-mode program first and build the GUI on top, rather than the other way around.

    (OK, bring on the flames. I don't have to work with that CRAP. :)

  • (cs) in reply to Medinoc
    Medinoc:
    used Word automation and someday was paralyzed by an unforeseen, invisible "spellchecker overloaded by too many spelling errors" modal message box.

    Wow, good luck debugging that!

    TRWTF is pussy whipped managers that when reached with this kind of requirements, sheeply accepts them as valid. But, OTOH at the time, since it was a client-side application, maybe it made sense.

  • Joe (unregistered)

    Oh, I hope the part where the CRAP handles multiple simultaneous requests properly was left out of the story by editorial license.

    It would be a bad thing if user A got the spreadsheet user B just uploaded instead of the one 'e's waiting for.

    --Joe

  • Sarten X (unregistered) in reply to TheCPUWizard
    TheCPUWizard:
    That is the real WTF. Microsoft Office Licenses specifically prohibit the applications from being used in a Server Environment.
    As an admin currently working through an audit, I'll point out that Microsoft's licensing is TRWTF.
  • (cs) in reply to ubersoldat
    ubersoldat:
    Medinoc:
    used Word automation and someday was paralyzed by an unforeseen, invisible "spellchecker overloaded by too many spelling errors" modal message box.

    Wow, good luck debugging that!

    It wasn't that bad, because launching Word first and launching the server process in an interactive session made the Word automation visible on the server machine. Still shows that server-side Office automation = WTF and even Microsoft agrees on that.

  • (cs)

    I was expecting the story to end like this: he found out that the spreadsheet just did simple multiplication and addition, so he simply inlined the calculation into the code and got rid of the Excel nonsense altogether. Wishful thinking, apparently!

  • ¯\(°_o)/¯ I DUNNO LOL (unregistered)

    I don't see the WTF here. I mean, Excel is Turing-complete, right? Party on!

    I'm sorry, I meant to say "Excel is WTF-complete".

  • Abico (unregistered)

    If I wanted to read I'd pick up a book. Where's the code? Code me!

  • WC (unregistered)

    It's an excel spreadsheet. It's got formulas in it. Turn them into server-side code and eliminate all that craziness.

    I've written some seriously crazy Excel formulas in my day, but every one of them would have been a lot easier in a normal language that would run on that server with no problems.

  • Code Master (unregistered) in reply to LoremIpsumDolorSitAmet
    LoremIpsumDolorSitAmet:
    I was expecting the story to end like this: he found out that the spreadsheet just did simple multiplication and addition, so he simply inlined the calculation into the code and got rid of the Excel nonsense altogether. Wishful thinking, apparently!

    In my experience the excel spreadsheet would be running several VBA add ins, and few COM libraries, plus maybe some xlls, and the calculation would involve calling serveral of these. Replacing this functionality in your code would be difficult assuming it wasn't all documented (fairly safe assumption).

  • (cs) in reply to TheCPUWizard
    TheCPUWizard:
    Microsoft Office Licenses specifically prohibit the applications from being used in a Server Environment. This is the biggest reason why Server Applications that *must* create Office "documents" need to use the OpenXML implementation.

    Adding something to the "License Compliance System" does NOT make something actually comply with legal licensing requirements.

    Not quite. It prohibits installing it to a server for the purposes of serving requests to unlicensed clients. In other words, doing Excel-y things for users who don't have Excel installed.

    As long as Excel is installed as part of your standard build, so all users using the server app have a local installation, you're golden.

  • emaNrouY-Here (unregistered)

    I'm wondering if an enterprising hacker would be able to insert a little code injection into those forms and have excel pwn the web server.

    Seems like this solution as bad as it is on the surface is just as bad, or worse, underneath.

  • (cs)

    Got the cornify image to come up.

    where this line is: Aram had heard that the core developers were gradually migrating it to a more SOA implementation.

    click on the word SOA

  • Tiki (unregistered)

    The CRAP hit the fan... an nobody cleaned it up.

    CAPTCHA: causa - causes nausea

  • (cs)

    Ah, the joys of people that have no idea about IT operations wanting to utilize IT for their business; it always ends up with a clusterfuck because the people making the high-level decisions don't know anything other than computers are some magic box. That's where this nonsense about "enterprise assets" and "required to use SOA" comes from - somebody that clearly has no clue what they're doing but heard/used a few buzzwords in a past life.

    This is why IT policy should only ever be decided by people with modern IT background; I'm so tired of having the IT boss be some nimrod who cut their teeth on mainframes or Foxpro or some ancient and obsolete technology decades ago but who never bothered to evolve with the industry. They ALWAYS cause major WTFs because they don't understand how technology works in the modern age.

  • pif (unregistered) in reply to foo

    sane systems implement functionality in a library or batch-mode program first and build the GUI on top

    You may s/sane/Unix/.

    Captcha: immitto; indeed, I'm "immitting" my comment.

  • (cs) in reply to letatio
    letatio:
    I cringe merely at the thought of Microsoft in a server environment.
    I'm pretty sure this whole site is run using IIS and ASP.Net...
  • WaffleSauce (unregistered)

    :(

    I don't want to live on this planet anymore......

  • tim (unregistered) in reply to TheCPUWizard
    TheCPUWizard:
    Aram got it all re-installed and added to the License Compliance system, but he had one question.

    That is the real WTF. Microsoft Office Licenses specifically prohibit the applications from being used in a Server Environment. This is the biggest reason why Server Applications that must create Office "documents" need to use the OpenXML implementation.

    Adding something to the "License Compliance System" does NOT make something actually comply with legal licensing requirements.

    and TRWFT is, no they don't - get your facts straight

  • (cs)

    Any solution so...wrong...could only be the brainchild of a PHB. Is this from a Dilbert comic?

  • El Ka-Ben (unregistered)

    It sounds mostly like a stopgap measure to me -- they get it working now and add this to the bug tracking list. When they get a chance to tackle it then it can be rewritten in code.

    Right now someone has disabled the current production version, not their development version, and that needs to be addressed before the root cause can be tackled.

    It'd be like putting the doughnut spare back on the car to get to the shop and have a tire replaced.

  • Little Bobby Excel (unregistered) in reply to emaNrouY-Here
    emaNrouY-Here:
    I'm wondering if an enterprising hacker would be able to insert a little code injection into those forms and have excel pwn the web server.
    Exactly. This situation does not call for persuading management to do The Right Thing, because they've already demonstrated that their comprehension of such matters has drifted inside the event horizon of a black hole.

    Instead, this is where compliance is your friend. If you can't get them on the license* nonsense, go to an unsecured wi-fi and use TOR to upload a malicious spreadsheet that splatters ugly colors all over the place but does no real harm. (They need to see the threat to understand it.) Then arrange for your company's auditor to hear that OMFG our server was haxxor3d!! Stand back and watch in amazement as idiots get fired and management takes a day off from playing golf to try to figure out WTF is going on.

    • Seriously, if paying good money for something that's available free doesn't bother you, then what about the legal risk? And all the hassle of license management? Free software is so much better even if the only thing it adds is freedom from the abuse heaped upon you by license-checking mechanisms
  • Jack (unregistered) in reply to pif
    pif:
    > sane systems implement functionality in a library or batch-mode program first and build the GUI on top

    You may s/sane/Unix/.

    That's pretty much a tautology.

    In other words, s/sane/Unix/g

  • Oh My (unregistered)

    Sounds like a few "team members" need a large dose of Specialized High Intensity Training.

  • (cs)

    What, you mean a rewrite?

    The next best thing after doing a totally green field project is being allowed to do a rewrite.

    A good rewrite will not necessarily throw everything away but will often mean a re-architecture and then bring in what you find useful and throw away whatever isn't. A bit like demolishing a building or vehicle but being able to use some of the parts to rebuild.

    In my history I have joined many a project who brought in a moderate to large development team to do a "rewrite" but then the team sat for months waiting for permission whilst having to "just wait until after the next release" and spending their time doing small enhancements and endless test runs instead, after which most got bored and left.

    And during all that time the team could be writing ahead: developing and prototyping and ensuring things work better, but that often requires investment, and possibly a bit of extra hardware which always seems to go begging and is often not justified by the fact that after 6 months or whatever they haven't written much "production" code.

    There is also a misconception that the more code that is changed, the more chance of introducing bugs and the harder the maintainence. That is NOT the case. The more obscure the codebase and the requirements, the more chance of bugs and the harder the maintenance. When you rewrite, you will end up far more familiar with the codebase. And good documentation and specifications will ensure you are properly familiar with the requirements.

    And yes, sometimes the process changes.

  • foxyshadis (unregistered) in reply to WC
    WC:
    It's an excel spreadsheet. It's got formulas in it. Turn them into server-side code and eliminate all that craziness.

    I've written some seriously crazy Excel formulas in my day, but every one of them would have been a lot easier in a normal language that would run on that server with no problems.

    Sadly, the users probably STILL send updated "templates" regularly, and can't be bothered with learning any templating language other than their homegrown Excel one.

  • Another Andrew (unregistered)

    I got to the paragraph where he mentioned excel on the server and I threw up a little in my mouth.

    I've approached problems with excel on the server and never have I concluded that it was a good enough for production. The only reason you would want excel invoked is so that you can offer the results in a downloadable spreadsheet and there are .net components that will do that for you without having to work with excel on the server.

    Aside from the nasty usage of excel formulas, how many instances can excel manage server-side before it crashes, one? A database and asp.net would be far superior for processing the form and then if they needed to export to excel then they could use a .net component. It would handle all the requests you could throw at it and would be much easier to support.

  • shinyemptyhead (unregistered)

    I ran into a similar situation years ago, working on a Visual C application that created documents using MS Word templates owned by the users, which were then populated via a set of WordBasic commands. The idea was that the users would be able to customise the tmeplates - but nobody ever did, they just treated it as another impenetrable directory of application data. It was thus pretty pointless, but it worked - until the users were upgraded to Office 97 and WordBasic was no longer supported. After some heated discussions, the code was updated to produce RTF files directly instead.

  • foo2 (unregistered) in reply to Medinoc
    Medinoc:
    I didn't know about the license thing, but I know there is an article on MSDN that recommends against using Office Automation on server-side code, because there is no official support for it and the UI can't be disabled, only hidden.

    It means that there is nothing, nothing, that prevents the automated Office application from displaying (visibly or not) a modal dialog box.

    Some old code of ours (thankfully replaced with OpenXML since) used Word automation and someday was paralyzed by an unforeseen, invisible "spellchecker overloaded by too many spelling errors" modal message box.

    Excel is rather behaved when automated; so when you turn dialogs off, well, they turn off.

    Word, on the other hand, just loves tossing up weird & wonderful messages and bringing the whole show to a standstill. Automating Word client-side is bad enough...

  • foo2 (unregistered) in reply to foo2
    foo2:
    Excel is rather behaved when

    ...well-behaved..., that is.

  • (cs) in reply to pif
    pif:
    > sane systems implement functionality in a library or batch-mode program first and build the GUI on top

    You may s/sane/Unix/.

    Actually, s/sane/designed to be automated/. Even on Linux, I doubt there are too many games (to pick just one example) designed as a command line system with a UI built on top of it.

  • mag (unregistered)

    I hope Customer/Regulation Administration Processor was commonly referred to as C/RAP

  • Valczir (unregistered) in reply to Leak

    I kinda think that was the point. And I fully agree. Microsoft anything is useless. Microsoft anything in a server environment is frightening.

  • Michael (unregistered) in reply to Medinoc

    Some code of ours (which is still there) uses Microsoft Office applications to print documents with a special printer and convert them to fax messages. If conversion takes to long, it attempts to click on modal dialogs.

    Usually this only happens if the print area differs from the printer's, otherwise works just fine. Of course, if it happens, then for the 10000+ fax jobs that were spawned from documents created by the marketing department [please do not add bleed to ads to be sent via fax, thank you] ;)

  • foo2 (unregistered) in reply to Michael
    Michael:
    print documents with a special printer and convert them to fax messages.
    I vaguely remember what a 'printer' is, but what's this 'fax' you speak of?
  • Some Random Texan (unregistered)

    So if someone screwed with the Excel calculation spreadsheet, they could make an error pop up on Excel, and everyone's "calculator" on the client side would return all 0's without any notification otherwise.

    Looks like TRWTF is unmitigated client requirements.

    Code does what the client wants, how the client wants.

    captcha. caecus - old English for blind. Oh the irony

  • (cs) in reply to Medinoc
    Medinoc:
    I didn't know about the license thing, but I know there is an article on MSDN that recommends against using Office Automation on server-side code, because there is no official support for it and the UI can't be disabled, only hidden.
    From personal experience; the older COM interop assemblies for Office automation would leak entire instances of Excel.exe when the application pool happened to recycle in the midst of an operation, because dispose operations tied into freeing everything would never be called correctly in that scenario.

    I guess you could call that 'not being officially supported'...

    One of my former employers actually worked the issue by using a dedicated (virtual) machine to mangle Excel I/O and putting it on a 15min reboot cycle. Good lord that application was awful.

  • Slapout (unregistered)

    I've been fighting with the OpenXMLSDK for the last two days. You'd think it'd be easy to find a content control by tag name and replace it's contents, but no...

  • G Applqst (unregistered)

    ClosedXML is a free wrapper of OpenXML that improves productivity tremendously for reading/writing xlsx.

  • Michael (unregistered)

    Amazing! TRWTF is that my old workplace (a German Investment Bank in London) did something similar about 10years ago. And it was waved through with the same arguments: The front-office people love Excel and want to be able to update their formulas easily.

  • LANMind (unregistered) in reply to Michael
    Michael:
    Amazing! TRWTF is that my old workplace (a German Investment Bank in London) did something similar about 10years ago. And it was waved through with the same arguments: The front-office people love Excel and want to be able to update their formulas easily.

    It would be nice if dot net provided a runtime interpreter. I manage a bunch of contantly changing pricing formulas that I would love to present to the users in a UI, and if it isn't right then it isn't my problem...

  • (cs) in reply to foo2
    foo2:
    Michael:
    print documents with a special printer and convert them to fax messages.
    I vaguely remember what a 'printer' is, but what's this 'fax' you speak of?

    Image download over POTS (except that fax machines actually predate telephones)

  • Frostie (unregistered) in reply to Cbuttius

    Sparkly ones!

    The power of SOA!

  • barf 4 eva (unregistered) in reply to letatio
    letatio:
    TheCPUWizard:
    Aram got it all re-installed and added to the License Compliance system, but he had one question.

    That is the real WTF. Microsoft Office Licenses specifically prohibit the applications from being used in a Server Environment. This is the biggest reason why Server Applications that must create Office "documents" need to use the OpenXML implementation.

    Adding something to the "License Compliance System" does NOT make something actually comply with legal licensing requirements.

    I cringe merely at the thought of Microsoft in a server environment.

    Happens all the time, so cringe away..

Leave a comment on “Excel-lent Design”

Log In or post as a guest

Replying to comment #394723:

« Return to Article