Add Ons - DevSource
DevSource: Microsoft Developer Resource DevSource Home Sponsored by Microsoft Home Add Ons Architecture Languages Techniques Using VS Forums
Home arrow Add Ons arrow A Word To The .NET-Wise
A Word To The .NET-Wise
By Jim Mischel

Rate This Article: Add This Article To:

Reviewed: Aspose.Word lets your .NET applications read and write Microsoft Word documents — and it does so with grace and ease.

Company:
Aspose Pty Ltd., Sydney, Australia. www.aspose.com
Price:
Base price $414 USD. Pricing varies with version and number of servers.
Bottom Line:
Aspose.Word is a simple and effective alternative to Office Automation for reading and writing Microsoft Word documents from .NET programs.

One of the most difficult tasks that developers face is creating reports that the users request in a format that the users accept. The days of fixed-space fonts and strictly tabular reports are long gone. Users these days want reports that look like they were created by hand in a word processor, complete with letterhead, justified margins, multiple fonts, dynamic tables, and many other advanced features of modern word processors. Creating that kind of thing by hand, or even using a generic report writer, is difficult at best.

ADVERTISEMENT

However, using Microsoft Office Automation to read or write Word documents from a .NET program is an exercise in frustration. It's slow, the API is weird, and the Automation interface is cantankerous. It's also expensive, because you have to install Word on any computer that will process documents. Microsoft itself strongly discourages the use of Office Automation in server-side software solutions, for abundant reasons pointed out in their support article, Considerations for Server-Side Automation of Office. Clearly, Office Automation isn't the answer.

Aspose.Word is a standalone .NET component that reads and writes Microsoft Word files. You can link it directly with your .NET programs and process Word files on a workstation or server, without the need for any Office components. Aspose.Word presents a Word document using an object hierarchy that is similar to the Microsoft Word object model. Using it, you can open and read any Word document from Word 97, Word 2000, Word XP, and Word 2003. Just the ability to read Word documents is almost worth the price of admission, but Aspose.Word gives you much more. Its real strength is its ability to write new documents and modify existing documents.

One way to create a report is to use Microsoft Word to create and save a template document. Then, using Aspose.Word, your program can load that template, and merge data from any .NET data set into identified fields of the document to create the final report. You can save the file in Word 97 format (which can be read by all later versions of Word), plain text, HTML, or an XML format that you can subsequently pass to Aspose.Pdf (a separately-priced product) to create a PDF file. This all works quite well, with a minimum of fuss, and with no OLE automation.

You can download a fully-functional evaluation copy of Aspose.Word in Microsoft Setup format. The installation program copies the files to your Program Files directory and creates a virtual directory that points to the compiled demo programs. The installation creates Start menu options that load the demos project, view the documentation, and run the demos on your computer (provided that you have a Web server installed). The demo programs, supplied in C# and Visual Basic, show how to create labels, a customized letter, an invoice, and several other common forms from supplied templates. I found that the demos work and the code provides very good examples from which to create my own applications.

I understand that pricing a component like this is somewhat difficult, but I found the Aspose pricing page to be a bit confusing. Aspose has many different products, which is one source of confusion, but then they complicate it further with a lot of different options: limitations, editions, platforms, deployment, number of servers, number of domains, etc. It looks like a basic Professional edition license that allows one development machine and one Web server is $414 (USD). If so, that's a very reasonable price. The price goes up for multiple development machines and multiple Web servers, but it's still very reasonable when you consider the functionality you get and what it would cost you to implement that yourself. You certainly can't get too much work out of a good .NET developer for what Aspose.Word will cost you.

Other than the pricing, I don't see anything to complain about. The Aspose.Word object model is straightforward, the API is easy to use, the documentation is better than average, and it works. This is a perfect example of a component that does one thing very well with no extraneous bells and whistles to get in the way and cause problems. I will certainly give the product a closer look the next time I have to work with Word files.

Aspose.Word is also available as part of the Aspose.Office suite, which includes Aspose.Word, Aspose.Excel, Aspose.PowerPoint, and Aspose.Project. If you need to manipulate Office file formats, you should give these components a look.




Discuss A Word To The .NET-Wise
 
>>> Be the FIRST to comment on this article!
 

 
 
>>> More Add Ons Articles          >>> More By Jim Mischel
 



Microsoft's Future: A Chat With Their CTO, Barry Briggs

Play Video >

All Videos >

Julia explores the Robotics Studio!

Read now >

Messages to Bill Gates!

Read now >

View Now
DevSource RSS FEEDS
XML Want an easy way to keep up with breaking tech news? And the Get DevSource headlines delivered to your desktop with RSS.