I guess it works (although the output isn't particularly good), but it's drained quite a bit of maintenance time and even more morale.
That being said, I wish I never had to program a mail merge in the COM ever again.
The problem for web apps (for example written in Classic ASP or ASP.NET) is that each request can create its own instance of Excel, and if the request that did this didn't complete and cleanly close down Excel then you end up with loads of orphaned Excel instances lurking in the background. When this happens eventually the web server runs out of memory.
Excel is definitely not intended for this type of use. Some people get lucky because they know what they're doing, 99% of the rest should just stay away.
It's slow, and really hard to debug when it's not working (not only pdf output but merge fields).
> Just us a serialized queue using MSMQ. Write the queue listener in Javascript and register with COM+.
Sure, but now you have MSMQ and COM+ to deal with...and debugging/fixing when it breaks (under load), or isn't secured properly.
The smart folks shell out for a copy of Aspose Cells and get the job finished on time.
On more recent projects in last ~12 months, I have used OpenXML.
The lock file is on the AIX side because Win files aren't atomic.
It's a bit Rube Goldberg-ish and has low traffic, but it's rock solid.
https://www.connectionstrings.com/microsoft-jet-ole-db-4-0/s...
https://www.connectionstrings.com/microsoft-text-odbc-driver...
I wouldn't recommend it...
It'll work until it doesn't [1]. Like if you want to do two things at the same time.
> Considerations for server-side Automation of Office
> ...
> Reentrancy and scalability: Server-side components need to be highly reentrant, multi-threaded COM components that have minimum overhead and high throughput for multiple clients. Office applications are in almost all respects the exact opposite. Office applications are non-reentrant, STA-based Automation servers that are designed to provide diverse but resource-intensive functionality for a single client. The applications offer little scalability as a server-side solution ... Developers who plan to run more than one instance of any Office application at the same time need to consider "pooling" or serializing access to the Office application to avoid potential deadlocks or data corruption.
And if you want to use this functionality to service the requests of anonymous users, make sure to read up until "[u]sing server-side Automation to provide Office functionality to unlicensed workstations is not covered by the End User License Agreement (EULA)."
[1] https://support.microsoft.com/en-au/kb/257757