Office Interop Alternative for Document Generation

We are currently using the gateway office to create documents from templates in office 2003 (word, excel and powerpoint). This seems to be pretty disapproving (see office-interop-with-64bit-windows-in-asp-net ), and as long as it works fine, I would be happier with the supported solution.

What is not a hacker method for this? Requirements:

  • Office 2003 only. (Valid Office xml / office 2007 compatibility pack not allowed)
  • You must start the server side of ASP.NET
  • It should be possible to create Word, Excel, and Powerpoint documents from user-supplied .dot, .xlt, and .pot templates.
  • Must be able to further customize the settings, replacing specific text at specific points, for example. names, addresses, etc.
  • Free or very low cost. I'm not going to raise a purchase order to replace the working system on the grounds that four people on some website thought it was a dirty hack;)

I'm not sure there is a better way. There is?

+6
ms-office office-interop
Jun 24 '09 at 16:28
source share
9 answers

I just posted this as an answer to another question about Office automation, but I think this is the right answer to this question (especially because you're looking for a free or low-cost solution).

I had no problems (poor performance, process hangs, process failures, etc.) using Microsoft Excel, Word and PowerPoint through interaction in a web service for printing Office documents in PDF format. I also ran into problems that I suspect were caused by invisible dialog boxes (the file may be damaged, only reading is recommended, the file is password protected or something else).

I know that there are tools that do not use Office, but they are very expensive. My solution was to switch to OpenOffice automation. OpenOffice seems a lot more stable, and I left the freezing processes and the like.

So, although I believe that I say "do not automate Microsoft Office", I do not propose to completely abandon automation; I just had a lot more success in OpenOffice automation than in Microsoft Office.

+4
Sep 08 '09 at 13:44
source share

Aspose has a number of components in .NET and Java for creating Word, Excel, and Powerpoint documents.

+1
Jun 24 '09 at 16:38
source share

Take a look at http://npoi.codeplex.com/ I use it to create excel documents. supports ppt and word.

+1
Sep 16 '09 at 6:01
source share

Windward reports do exactly what you want (disclaimer, I'm CTO at Windward). With Windward, you create documents in Word, Excel or PowerPoint, and then our engine combines this template with data to create the final document. The mechanism is available in Java and .NET and DOES NOT use Office on the server, so it is very fast and does not have problems with which you get interaction.

+1
Feb 18 '11 at 15:53
source share

If you have SQL Server, you can see SQL Server Reporting Services

0
Jun 24 '09 at 16:34
source share

You should take a look at the products available from Aspose . There are several different file formats that allow you to create and process PDF and Microsoft Office documents without requiring Office to be installed on the server:

File Format Components (Aspose)

Software Artisans have some similar components that can read and write Word and Excel documents:

Artisans OfficeWriter Software

0
Jun 24 '09 at 16:40
source share

SpreadsheetGear for .NET can handle the creation of Excel files. We focus on spreadsheets, so we do not have generations of Word or PowerPoint.

You can see ASP.NET samples here and download a free trial.

Disclaimer: I have SpreadsheetGear LLC

0
Jun 24 '09 at 16:42
source share

One of the ways we did this, but not with template files, is to create your document template and save it as a word, excel or ppt document, but in a format in which the document remains in human-readable text. So for Word and Excel save as mht.

Then you can read in the template as a string and process it with the good old-fashioned string manipulation functions (replace the placeholder text, add the lines you need to do), and then save the line as .doc, .xls or .ppt (which once or created it), and he should open the right copy as a document in this application with all your formatting.

One tip, you should check your template in a text editor after saving it in Word. Word will indiscriminately add line breaks so that it can break your placeholders or put other formatting in them that you may need to clear.

0
Jun 25 '09 at 12:01
source share

Take a look at the OWCs (Office Web Components) that were designed for what you want to do!

I don’t know if they can work with templates, since they will increase since I used them, but we used to generate extended sheets on the fly, and then the binary entries wrote them to the response stream to display them in the browser .

I’m not sure that they will fully satisfy your requirements, but at least it’s worth looking at how to start.

0
Jun 25 '09 at 12:13
source share



All Articles