[rules-users] Multiple worksheet decision tables

Vikrant Yagnick Vikrant.Yagnick at mastek.com
Thu Oct 1 10:08:00 EDT 2009


Hi,

I had  written some code for this a while ago. But, basically Drools uses jxl for compiling decision tables.
You can also use JXL. It has an API that gives you all the worksheet names, which you can then pass to the compiler one by one to compile all your decision tables.

>From memory it went something like this (Import jxl***.jar)

Worksheet w=new WorkSheer(new File("filepath.xls"));

w.getSheets();

This should get you a list of sheets.

Cheers,
Vikrant
________________________________________
From: rules-users-bounces at lists.jboss.org [rules-users-bounces at lists.jboss.org] On Behalf Of Swindells, Thomas [TSwindells at nds.com]
Sent: Thursday, October 01, 2009 5:33 PM
To: rules-users at lists.jboss.org
Subject: [rules-users] Multiple worksheet decision tables

Is it possible to get Drools to load all the rules table within an excel spreadsheet if they are spread across multiple worksheets?
>From the documentation I have read it appears drools will only load the rules from the first/a specified worksheet.
The only way I have found to do it is to load the worksheet multiple times and explicitly state each of the worksheet names in turn.  Is this the only way?
If so is there any easy way to get the names of all the worksheets in the file? The application won't know the worksheet names ahead of time.

Many thanks,

Thomas


**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster at nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

MASTEK LTD.
Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





More information about the rules-users mailing list