Try renaming your document to fileName.xlsx
POI now supports the latest XML based Excel document format and I believe
EGWrapper is using a new version of POI.
JR
On 2011-03-24, at 11:17 AM, Theodore Petrosky wrote:
> Was there an update that hosed EGWrapper? All of a sudden my export to excel
> is broken. the result file will not open in excel (nor Numbers).
>
> there are no warnings nor errors and I made no changes to my excel component.
> I don't even know where to begin looking for the error.
>
> Numbers gave me this warning:
>
> Import Warning - This is a tab delimited document, not a valid Excel
> document. The data might look different.
>
>
> <webobject name = "aWrapper">
> <p>
> <webobject name = "BackLink">Back</webobject>
> </p>
> <table name = "Color Grid">
> <tr>
> <th cellType = "CELL_TYPE_STRING" colspan = "8"><wo:WOString value =
> "$headerText" /></th>
> </tr>
> <tr>
> <th cellType = "CELL_TYPE_STRING">Internal Rel</th>
> <th cellType = "CELL_TYPE_STRING">Material Close</th>
> <th cellType = "CELL_TYPE_STRING">Publication</th>
> <th cellType = "CELL_TYPE_STRING">Center</th>
> <th cellType = "CELL_TYPE_STRING">Publish Date</th>
> <th cellType = "CELL_TYPE_STRING">Publish Year</th>
> <th cellType = "CELL_TYPE_STRING">Status</th>
> <th cellType = "CELL_TYPE_STRING">PickUp/New</th>
> <th cellType = "CELL_TYPE_STRING">Headline</th>
> <th cellType = "CELL_TYPE_STRING">Image</th>
> <th cellType = "CELL_TYPE_STRING">Job Number</th>
> <th cellType = "CELL_TYPE_STRING">Billing</th>
> <th cellType = "CELL_TYPE_STRING">Invoice</th>
> <th cellType = "CELL_TYPE_STRING">Comments</th>
> </tr>
>
> <wo:WORepetition list = "$theGridList" item = "$theGridItem">
> <tr>
> <td cellType = "CELL_TYPE_STRING"><wo:WOString value =
> "$theGridItem.internalRelease" dateformat = "%m-%d-%Y"/></td>
> <td cellType = "CELL_TYPE_STRING"><wo:WOString value =
> "$theGridItem.materialsClose" dateformat = "%m-%d-%Y"/></td>
> <td cellType = "CELL_TYPE_STRING"><wo:WOString value =
> "$theGridItem.publication" /></td>
> <td cellType = "CELL_TYPE_STRING"><wo:WOString value =
> "$theGridItem.center"/></td>
> <td cellType = "CELL_TYPE_STRING"><wo:WOString value =
> "$theGridItem.publishDate"/></td>
> <td cellType = "CELL_TYPE_STRING"><wo:WOString value =
> "$theGridItem.materialsClose" dateformat = "%Y" /></td>
> <td cellType = "CELL_TYPE_STRING"><wo:WOString value =
> "$theGridItem.itemStatus"/></td>
> <td cellType = "CELL_TYPE_STRING"><wo:WOString value =
> "$theGridItem.pickUp"/></td>
> <td cellType = "CELL_TYPE_STRING"><wo:WOString value =
> "$theGridItem.headLine" /></td>
> <td cellType = "CELL_TYPE_STRING"><wo:WOString value =
> "$theGridItem.image" /></td>
> <td cellType = "CELL_TYPE_STRING"><wo:WOString value =
> "$theGridItem.jobNumber" /></td>
> <td cellType = "CELL_TYPE_STRING"><wo:WOString value =
> "$theGridItem.billing" numberformat="##.##"/></td>
> <td cellType = "CELL_TYPE_STRING"><wo:WOString value =
> "$theGridItem.invoice" /></td>
> <td cellType = "CELL_TYPE_STRING"><wo:WOString value =
> "$theGridItem.comments" /></td>
> </tr>
> </wo:WORepetition>
> </table>
> </webobject>
>
>
> WOD
>
> aWrapper: EGWrapper {
> enabled = enabled;
> styles = application.data.Styles; //VALID
> fonts = application.data.Fonts; //VALID
> }
>
>
> BackLink: WOHyperlink {
> pageName = "Main";
> }
>
>
>
> JAVA
>
> package com.eltek.components;
>
> import com.eltek.model.Grid;
> import com.webobjects.appserver.WOContext;
> import com.webobjects.foundation.NSArray;
>
> import er.extensions.components.ERXComponent;
>
> public class ExportToExcel extends ERXComponent {
>
> private static final long serialVersionUID = 1L;
> public boolean enabled = false;
> private NSArray<Grid> theGridList;
> public Grid theGridItem;
> public String headerText = "AgencySacks Color Grid";
>
> public ExportToExcel(WOContext context) {
> super(context);
> }
>
> public void setTheGridList(NSArray<Grid> theGridList) {
> this.theGridList = theGridList;
> }
>
> public NSArray<Grid> theGridList() {
> return theGridList;
> }
>
>
> }
>
> Ted
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/jr%40mpv.com
>
> This email sent to [email protected]
JR Ruggentaler
Senior Software Developer
Medical Present Value, Inc
[email protected]
Office 512.439.0206
Mobile 512.431.6849
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]