Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » exportMultipleNatTables()(Exporting multiple NatTables)
exportMultipleNatTables() [message #1062441] Fri, 07 June 2013 13:32 Go to next message
E K is currently offline E K
Messages: 2
Registered: June 2013
Location: Germany
Junior Member
Hello guys,

I'm trying to export multiple NatTables into one Excel file. One sheet per table.

Method
NatExporter#exportMultipleNatTables(final ILayerExporter exporter, final Map<String, NatTable> natTablesMap)

seems to be perfect for this. But I wonder how it can ever work, because it always leads to an exception:
 java.lang.UnsupportedOperationException: Cannot set an area provider.
	at net.sourceforge.nattable.NatTable.setClientAreaProvider(NatTable.java:691)
	at net.sourceforge.nattable.export.NatExporter.setClientAreaToMaximum(NatExporter.java:183)
	at net.sourceforge.nattable.export.NatExporter.exportLayer(NatExporter.java:122)
	at net.sourceforge.nattable.export.NatExporter$2.run(NatExporter.java:81)


exportMultipleNatTables() only accepts NatTable(s) by its signature. Each one is passed to exportLayer() and than to setClientAreaToMaximum(). The latter method is calling ILayer#setClientAreaProvider() in class NatTable, but:
public void setClientAreaProvider(IClientAreaProvider clientAreaProvider) {
	throw new UnsupportedOperationException("Cannot set an area provider."); //$NON-NLS-1$
}

In my eyes, this never can work, right?

Is this method NatExporter#exportMultipleNatTables meant to be used like I do?
Re: exportMultipleNatTables() [message #1062463 is a reply to message #1062441] Fri, 07 June 2013 16:49 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1254
Registered: July 2012
Senior Member
Yes this seems to be a bug. Could you please create a ticket for this?
Re: exportMultipleNatTables() [message #1062522 is a reply to message #1062441] Sat, 08 June 2013 04:53 Go to previous message
E K is currently offline E K
Messages: 2
Registered: June 2013
Location: Germany
Junior Member
done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=410254
Previous Topic:Data Validation
Next Topic:removing alternate row color style
Goto Forum:
  


Current Time: Thu Aug 21 04:24:19 EDT 2014

Powered by FUDForum. Page generated in 0.02696 seconds