Home     Products      Support      Corporate     Sign In 

Deliver Native Excel & Word
Through Java Web Applications


Deliver reports in the format your users are demanding: Microsoft Office.

With OfficeWriter, companies that work within mixed-platform environments can still provide real Office file formats to their users. Through a simple SOAP call, it's easy to generate native Excel and Word reports from your presentation-tier Java Web application. Here's how it's done

 
Steps to Create a .NET-J2EE
Interoperability Web Service
1. Create .NET Web Service
2. Generate Java Web Service proxies
3. Call Web Service from your Java application
4. Stream file to the client
 
 Complete Web Service and Sample Instructions
 Download Sample Code (.NET Web Service and Java Client)
 Need more information - see our online forums
 
Generate Your Document from Template or Code
Template Approach
[WebMethod]
public byte[] GetWordDoc(PurchaseOrderHeader headerData, PurchaseOrderRow[] data)
{
    DataTable dtHeader = GetOrderHeaderData(headerData);
    DataTable dtDetail = GetOrderDetailData(data);
    WordTemplate wordTemplate = new WordTemplate();
    wordTemplate.Open(.MapPath("templates/POTemplate.doc"));
    wordTemplate.SetDataSource(dtHeader);
    wordTemplate.SetRepeatBlock(dtDetail, "OrderDetailQuery");
    wordTemplate.Process();
    MemoryStream output = new MemoryStream();
    wordTemplate.Save(output);
    return output.ToArray();
}
 
Application Object Approach
[WebMethod]
public byte[] GetWordApplicationDoc(WordTextElement heading, WordTextElement subHeading, WordTextElement listName, WordTextElement[] listItems, Boolean numberedList)
{
    WordApplication wordApp = new WordApplication();

    // create new document
    Document wordDoc = wordApp.Create();

    // create ParagraphFormatting to make the heading center-justified
    ParagraphFormatting headingFormatting =
    wordDoc.CreateParagraphFormatting();
    headingFormatting.TextJustification =
    ParagraphFormatting.Justification.Center;

    // create heading
    CharacterRun headingRun = wordDoc.InsertParagraphAfter(null,
    headingFormatting).InsertTextBefore(heading.Text, true);
    headingRun.Font.TextColor =
    getSystemColor(heading.Color);
    headingRun.Font.FontSize = heading.Size;

    CharacterRun subHeadingRun = wordDoc.InsertParagraphAfter(null,
    headingFormatting).InsertTextAfter(subHeading.Text, true);
    subHeadingRun.Font.TextColor =
    getSystemColor(subHeading.Color);
    subHeadingRun.Font.FontSize = subHeading.Size;

    // create list
    CharacterRun listRun = wordDoc.InsertTextAfter(listName.Text,
    true);
    listRun.Font.TextColor = getSystemColor(listName.Color);
    listRun.Font.FontSize = listName.Size;

    List list = listRun.InsertListAfter(numberedList);

    for (int i = 0; i < listItems.Length; i++)
    {
        CharacterRun listItem =
        list.AddEntry(0).InsertTextBefore(listItems[i].Text, false);
        listItem.Font.TextColor = getSystemColor(listItems[i].Color);
        listItem.Font.FontSize = listItems[i].Size;
    }

    MemoryStream output = new MemoryStream();

    // save document to memory stream
    wordApp.Save(wordDoc, output);
    return output.ToArray();
}

 

 OfficeWriter Resources

 OfficeWriter Demos

 Evaluation Software Login to Access this Item


Additional Web
Services Resources


 .NET and J2EE Interoperability Best Practices

 Apache Web Services Project-Axis

 BEA WebLogic's Web Service Control

OfficeWriter
Evaluate
Features
OfficeWriter Features
Office on the Server
Two-Way Data Update
Return on Investment
Performance Testing
New Features in v3.5
Features for Excel
Features for Word
Customers & Partners
OfficeWriter Customers
Customer List
Success Stories
Product Reviews
OfficeWriter Partners
OEM & Reseller
Web Hosting
Platforms
OfficeWriter Platforms
ASP & ASP.NET
SQL Reporting Services
System Requirements
Product Resources
OfficeWriter Resources
OfficeWriter FAQ
Getting Started
System Requirements
Brochures
Order OfficeWriter
Order OfficeWriter
Developer License
Order Upgrade
Pricing & Licensing
Self-Help Resources
Support Home
Knowledge Base
OfficeWriter Docs
OfficeWriter Forums
Sample Code
Version Differences
Support Options
Support Subscriptions
Maintenance Plans
Per-Issue Support
Consulting
Training
Support Request Form
Downloads
Evaluation Software
Product Updates
Corporate
About SoftArtisans
Contact Us
Partners
Resellers & OEMs
Web Hosting
Order Info/Privacy Policy
Career Opportunities

To learn more about Officewriter and pricing information, contact SoftArtisans:

 
Email: sales@softartisans.com
Toll Free:1(877)SOFTART(763-8278), option 1
International:+1(617)607-8800, option 1
Purchase  |  Evaluate  |  Demos  |  Support  |  Contact Us  |  Site Map
Copyright 2008 © SoftArtisans, Inc. All Rights Reserved.