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

...

  1. Open a command prompt window and move to the directory OfficeWriter\bin\dotnet20\.
  2. Enter gacutil /i SoftArtisans.OfficeWriter.ExcelWriter.dll.
  3. Open the file machine.config (in [Windows directory]\Microsoft.NET\Framework[.NET version directory]\CONFIG).

...

Add the following line to the assemblies node of machine.config:

Code Block
xml
xml

<add assembly="Softartisans.OfficeWriter.ExcelWriter,
            Version=x.x.x.x, Culture=neutral, PublicKeyToken=f593502af6ee46ae"/>

...

Create a text file containing the following lines, and save it as web.config. Save web.config at the top level of your application.

Code Block
languagexml

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.web>
        <compilation>
            <compilers>
            </compilers>
            <assemblies>
                <add assembly="Softartisans.OfficeWriter.ExcelWriter,
                    Version=x.x.x.x,
                    Culture=neutral,
                    PublicKeyToken=f593502af6ee46ae"/>
                <add assembly="*" />
            </assemblies>
        </compilation>
    </system.web>
</configuration>

...

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

Code Block

using SoftArtisans.OfficeWriter.ExcelWriter; //For ExcelWriter
using SoftArtisans.OfficeWriter.WordWriter; //For WordWriter

...