Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to import data from Excel to an SQL database. The Excel data contains various parameters and their values, like P1, P1, P4, P5, etc. I have to apply business rules. Like if (P1 > 100 and P1 < 200) then insert the record in database. Similarly, in some cases, string values are also validated. Can I have any open source rule engine that contains UI to change, add, and delete the rules? I am using C# to read the Excel data and and inserting the records.

One more thing, which of the following is the best approach?

  • Read Excel data first and store every record as an object in a collection, iterate through the collection, apply business rules on every object and insert record in the database. Or

  • Read one record from Excel, apply business rules and insert the record in the database. Repeat the process for the whole Excel spreadsheet.

share|improve this question

closed as off-topic by Snowman, gnat, Kilian Foth, Bart van Ingen Schenau, GlenH7 Jan 23 '15 at 14:56

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Snowman, gnat, Kilian Foth, Bart van Ingen Schenau, GlenH7
If this question can be reworded to fit the rules in the help center, please edit the question.

Are you looking for a solution so users can manage the rules? – JeffO Oct 7 '12 at 15:04
Yes Preferably! but most important is rules should be stored in some repository even if i don't have UI for ends user to change them. – user641812 Oct 10 '12 at 5:42
Check the WF .NET Rule Engine or check out RuleProof from Solvono. – Ash Apr 13 '13 at 18:35

You may look for different simple rule engines in .NET. However, in the case if you're using .NET 3.0 or later, you can use the Rules Engine of Windows Workflow Foundation without using actually Workflow.

We have done this in our project, and you are free to use SQL or XML as the back-end, and it works pretty good. You can use the IDE that comes with the Workflow examples and use that in your own application.

You may also consider the following options:

share|improve this answer

protected by gnat Jan 23 '15 at 4:38

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.