Skip to main content



      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 04:44 Go to next message
Eclipse UserFriend
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 05:00 Go to previous messageGo to next message
Eclipse UserFriend
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 07:14 Go to previous messageGo to next message
Eclipse UserFriend
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 07:49 Go to previous messageGo to next message
Eclipse UserFriend
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 10:57 Go to previous messageGo to next message
Eclipse UserFriend
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 11:32 Go to previous message
Eclipse UserFriend
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: Mon Jul 14 13:34:06 EDT 2025

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

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

Back to the top