Download Template before import from excel document

1
Hi Guys,   I’m try to import the data from excel file. Before uploading the excel file I want to have a button for user to download the excel template so that user can refer the template and create a excel file accordingly. Could you please guide me how to develop a button to download the excel template.   Thanks in advance.
asked
2 answers
2

Hi Abrar,

To achieve this you can use the excel exporter. Here you make an excel export template, with headers. You can then create a button to do an excel export like you would normally do, only you do not create any data, this way the user will get only the template with the headers.

Hope this helps!

answered
0

Here is the link to the market place excel importer model: https://marketplace.mendix.com/link/component/72  , Here are the steps to set up the excel importer. After downloading, the module will be added to your app and you will see it in your Project Explorer. Configure the Excel Importer Module a. Go to the Project Explorer, navigate to the 'Excel Importer' module, and then to the '_USE ME' folder. b. Open the 'Overview (for administrators)' page. This page will allow you to import Excel templates and documents, set up import actions, and configure other settings. c. To start setting up an import action, you would need to first create an Excel template that matches your data model. To do so, right-click on the 'Templates' grid and click 'New'. d. In the new window, you will be asked to upload a sample Excel file (which should have the same structure as the files you want to import) and to select the entity to which the data should be mapped. e. After uploading the file and selecting the entity, you should map the columns in your file to the attributes of the selected entity. Create an Import Action a. Once the template is set up, go back to the 'Overview (for administrators)' page and click on 'Import Actions'. b. Right-click on the grid and click 'New'. This will allow you to create a new import action. c. In the new window, give your import action a name, select the template you created in the previous step, and set other parameters as needed. Create a Page for Users to Import Excel Files a. You can now create a new page (or use an existing one) in your app where users can upload Excel files. b. Add a 'Data grid' widget to the page and set the 'Entity path' to 'ExcelImporter.ExcelDocument'. c. Add a 'New button' to the data grid and connect it to the 'NEW_ExcelDocument' microflow from the Excel Importer module. This will allow users to upload Excel files. d. Add a 'Microflow button' to the data grid and connect it to the 'START_Import' microflow from the Excel Importer module. This button will start the import process.

answered