Import data from an Excel sheet

7
What is the best/easiest way to import data from an Excel sheet into Mendix? The Excel sheet contains tree columns: product number, product name and a productgroup number. I want to use this data for making an order.
asked
5 answers
10

You can import 2 Excel import modules and the related Java actions in order to import data from Excel into Mendix. I can provide you the specific modules and Java actions.

To give answer to your comment: Here are the three steps to implement a Java action.

  1. Adding a Java action to a microflow;
  2. Deploy the project;
  3. Add Java code to the Java sources

Java actions are mainly used within a microflow. By adding an activity to a microflow, you can select a Java action.

After deploying the project, you are able to add the java code to the java sources in the project’s deployment location.

  • Go to your deployment location;
  • Select the map ‘Java source’;
  • Select the map of the module in which the Java action is added;
  • Select the ‘actions’ map;
  • Select the particular Java action and add the following text between ‘begin user code’ and ‘end user code’:

After following the three steps, you can deploy and run your Mendix application in order to test your action in the Internet browser.

answered
2

There is an Excel importer available at the Template store. You can find the importer here. If you import these modules and Java actions into your project, you are able to import data from an Excel sheet into Mendix.

Here are the three steps to implement a Java action.

  1. Adding a Java action to a microflow;
  2. Deploy the project;
  3. Add Java code to the Java sources

Java actions are mainly used within a microflow. By adding an activity to a microflow, you can select a Java action.

After deploying the project, you are able to add the java code to the java sources in the project’s deployment location.

  • Go to your deployment location;
  • Select the map ‘Java source’;
  • Select the map of the module in which the Java action is added;
  • Select the ‘actions’ map;
  • Select the particular Java action and add the following text between ‘begin user code’ and ‘end user code’:

After following the three steps, you can deploy and run your Mendix application in order to test your action in the Internet browser.

answered
2

There already is a version available in the Template store that you can download. I asume this version is up to date and works properly. For the download go to https://template-exchange.mendix.com and login. You will find the download under the name: Excel importer.

When you donloaded this template, you can import the module in your project the way Fedor described.

Good luck.

answered
0

How can I add these Java actions to my project?

answered
0

Here are the three steps to implement a Java action.

  1. Adding a Java action to a microflow;
  2. Deploy the project;
  3. Add Java code to the Java sources

Java actions are mainly used within a microflow. By adding an activity to a microflow, you can select a Java action.

After deploying the project, you are able to add the java code to the java sources in the project’s deployment location.

  • Go to your deployment location;
  • Select the map ‘Java source’;
  • Select the map of the module in which the Java action is added;
  • Select the ‘actions’ map;
  • Select the particular Java action and add the following text between ‘begin user code’ and ‘end user code’:

After following the three steps, you can deploy and run your Mendix application in order to test your action in the Internet browser.

answered