...
There are several steps to make OfficeWriter available to your .NET applications:
- Install OfficeWriter
- Include System.Web
- Add references to OfficeWriter
- Include OfficeWriter in your code
Anchor | ||||
---|---|---|---|---|
|
...
- Open a command prompt window and move to the directory OfficeWriter\bin\dotnet20\.
- Enter gacutil /i SoftArtisans.OfficeWriter.ExcelWriter.dll.
- 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 | ||||
---|---|---|---|---|
| ||||
<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 | ||
---|---|---|
| ||
<?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
|
...