Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Running Default NatTable Example as Eclipse Plug-in View - Excel Export isn't working (Problems with Excel Export)
Running Default NatTable Example as Eclipse Plug-in View - Excel Export isn't working [message #918684] Fri, 21 September 2012 08:44 Go to next message
Michi Classen is currently offline Michi ClassenFriend
Messages: 36
Registered: March 2012
Member
Integrating the easiest example of using NatTable into an eclipse plug-in, the export to excel function via key "CTRL+e" is not working.

Do you have any idea, why?

As plug-in dependencies I added:
- net.sourceforge.nattable.core
- new.sourceforge.nattable.extension.poi
- org.apache.poi (the poi-osgi plug-in)
Re: Running Default NatTable Example as Eclipse Plug-in View - Excel Export isn't working [message #918700 is a reply to message #918684] Fri, 21 September 2012 09:00 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
I have to admit that I haven't used all of the features of NatTable yet. Smile But I'm not quite sure if simply adding plugin dependencies will tell the NatTable to export with POI.
Did you add the configuration for exporting to the example? I have seen that not all examples make use of this, so I suppose the example you are talking about isn't using the POI extension too.

Try to add the following configuration to your example:
natTable.addConfiguration(new AbstractRegistryConfiguration() {
	public void configureRegistry(IConfigRegistry configRegistry) {
		configRegistry.registerConfigAttribute(ILayerExporter.CONFIG_ATTRIBUTE, new HSSFExcelExporter());
	}
});


Hope this helps,
Dirk
Re: Running Default NatTable Example as Eclipse Plug-in View - Excel Export isn't working [message #918811 is a reply to message #918700] Fri, 21 September 2012 11:14 Go to previous messageGo to next message
Michi Classen is currently offline Michi ClassenFriend
Messages: 36
Registered: March 2012
Member
The same example doesn't make use of this configuration. The default configuration of NatTable (DefaultGridLayerConfiguration) defines an excel export binding on key event CTRL+e. This works great on running as a java application but as soon as embedded into a plug-in, this is no longer working.

Adding your configuration to the NatTable is without any effect.
Re: Running Default NatTable Example as Eclipse Plug-in View - Excel Export isn't working [message #918834 is a reply to message #918811] Fri, 21 September 2012 11:49 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Is your plugin running in the eclipse ide? Ctrl+E is an already defined shortcut there. So you'll need to override that shortcut I guess. But I haven't looked at that before.
Re: Running Default NatTable Example as Eclipse Plug-in View - Excel Export isn't working [message #918977 is a reply to message #918834] Fri, 21 September 2012 14:57 Go to previous messageGo to next message
Michi Classen is currently offline Michi ClassenFriend
Messages: 36
Registered: March 2012
Member
The key combination is already in use, that's true. I had to define a context for the view, a key combination and a command to run the excel export. Now I try to override the default key combination by an unused comb.
Re: Running Default NatTable Example as Eclipse Plug-in View - Excel Export isn't working [message #1044979 is a reply to message #918977] Fri, 19 April 2013 15:32 Go to previous message
Testr t is currently offline Testr tFriend
Messages: 93
Registered: April 2013
Member
Do you have an example code of how you did this? Setting up a different shortcut key for the export to excel in eclipse plugin?
Previous Topic:Find dialog improvements
Next Topic:Row Filter
Goto Forum:
  


Current Time: Fri Apr 19 09:29:40 GMT 2024

Powered by FUDForum. Page generated in 0.01796 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top