Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There are several steps to make OfficeWriter available to your .NET applications:

  1. Install OfficeWriter
  2. Include System.Web
  3. Add references to OfficeWriter
  4. Include OfficeWriter in your code

Anchor
SystemWeb
SystemWeb
Add a reference to System.Web

All of the OfficeWriter API objects (ExcelTemplate, ExcelApplication, WordTemplate, WordApplication) have the output options for saving to disk, saving to memory stream, streaming to user in a page response. The last output option, streaming to the user, has a dependency on System.Web. If you are developing a web application, the reference to System.Web should have been added automatically. For other types of applications, you may need to add this reference.

...

Note

If you are compiling against .NET 4.0, make sure to use the full profile. The default profile does not include System.Web.

Anchor
reference
reference
Add a reference to OfficeWriter

There are two ways to do this:

...

Note
iconfalse

The version attribute of the add assembly node must correspond exactly to the version of Softartisans.OfficeWriter.<Excel/Word>Writer.dll added to the GAC. If you add a new version of Softartisans.OfficeWriter.<Excel/Word>Writer.dll to the GAC using the gacutil command, update the dll version attributes in machine.config. To get the exact version of Softartisans.OfficeWriter.<Excel/Word>Writer.dll, right-click the file and select the Properties tab.

Anchor
include
include
Include OfficeWriter in your code

On any page that uses OfficeWriter, make sure to add the appropriate using statements:

...