scieee AI-readable full text Open interactive document viewer

Excel file-API-DietEx tool

European Food Safety Authority (EFSA), Methodology and Scientific Support (MESE) Unit

Abstract

The European Food Safety Authority (EFSA) developed a macro-enabled Excel file that facilitates the submission of use-level data for food additives and flavourings to the DietEx tool via an Application Programming Interface (API).

Full text

Excel file version 1.0 , last updated October 2025 Using DietEx tool via API User guide for version 1.0 of the Excel file Using DietEx tool via API 2 APPLICATION PROGRAMMING INTERFACE (API) EFSA has developed a macro-enabled Excel file that allows sending Use levels data for food additives and food flavourings via application programming interface (API) to the DietEx tool. The API is used to connect the Excel file with the DietEx tool. To use the API, you must log in to the developer portal using B2C. Click on Sign in in the top right and then click on Azure Active Directory B2C. Follow the prompt. The developer portal is accessible at https://developers.efsa.europa.eu/. When logged in, you are able to access the “Products” page. Here, you will notice a DietEx product. Click open the product. You are then able to subscribe to it and generate subscription keys. After entering a name for your subscription and clicking Subscribe, you are directed to your Profile where you will see your new subscription. Below the name of your Subscription and the day of creation, you have two different Keys, primary key and secondary key. If you press on “Show”, an alphanumeric code is revealed. This code will be used in the Excel file developed by EFSA to send the Use levels to the DietEx tool. Using DietEx tool via API 3 USE LEVELS The Use level data needs to be first compiled using the ‘Reporting tool for Use levels on food additives and food flavourings’.1 Guidance on how to use this data model and information on the different data elements are reported in the corresponding EFSA Technical report (EFSA, 2025). Once the Use levels are introduced in the Reporting tool, these Use level will be uploaded into the Excel file. EXCEL FILE The Excel file is found here in Zenodo (https://doi.org/10.5281/zenodo.17406294). The Excel file should be downloaded and saved on the user's computer. When opening the file, please enable editing. The Excel file contains different Excel spreadsheets. Input by the user is only needed in the spreadsheets “Control Panel” and “API_settings”. SPREADHEET “API_SETTINGS” In this spreadsheet, users need to insert in the row 3 (API key) the alphanumeric code obtained at the moment of doing the subscription (see above). This will allow the connection of this Excel file with the DietEx account of the user to allow sending the Use levels data and, subsequently, assessing the exposure estimates. No others rows needs to be modified in this spreadsheet. It is important to note that the alphanumeric code is strictly personal and must be kept confidential. Under no circumstances should this code be disclosed to third parties, as it provides direct access to the user’s profile within the DietEx tool. 1https://zenodo.org/records/15172951 Using DietEx tool via API 4 SPREADSHEET “CONTROL PANEL” Once the Use levels have been compiled using the ‘Reporting tool for Use levels on food additives and food flavourings’, they are imported to the Excel file by using the button Import Dietex data. Users will select from their computers the Reporting tool file containing the Use levels. If the Reporting tool file contains more than one substance, a pop-up will appear asking to select the substance for which the Use levels will be imported. If the import is successful, a pop-up window will appear indicating that your data have been imported. In some cases, the pop-up window might inform you that some rows (Use levelsFoodEx2 codes) have been removed. This refers, to FoodEx2 codes reported more than once in the Reporting tool with different Use levels. When this occurs, the Excel file will only keep the FoodEx2 code with the highest Use level; the spreadsheet “Import_Removed_Data_log” will show the excluded repeated FoodEx2 code/s. Before sending the data to the DietEx tool, you must click on Precheck Analysis data. This allows to compare the imported FoodEx2 codes against two spreadsheets “ref_foodex; the spreadsheet “ref_foodex_tree”. The first one provides a list used by the DietEx tool in the exposure estimations. The spreadsheet “invalid_foodex” will list all the FoodEx2 codes excluded in case imported FoodEx2 codes do not exist in the DietEx tool (e.g., misspelling of the code in the Reporting tool). The spreadsheet “ref_foodex_tree” informs of the parent-child relationship in the FoodEx2 hierarchy considered by the DietEx tool. A selection of FoodEx2 codes connected by a branch relationship in the tree (ancestor-child or parent-child relationship) is not allowed. If this happens, a pop-up windows will appear asking the user to check the imported data (“Imported_Data”). The FoodEx2 codes that need revision are highlighted in red in this spreadsheet; the user can either delete them or fix the problem in the original file with the Use levels and import them again. The precheck also identifies if, by mistake, Use levels equal to “zero” were introduced for any FoodEx2 code. These Use levels will be also highlighted in red in the spreadsheet “Imported_data”. Once all the issues have been solved, please press again Precheck Analysis data. If the data are ready to be sent to the DietEx tool, a pop-up window will appear with the message “Pre-check completed – no issues found”. The data is sent to the DietEx tool by using the button Run Analysis in DietEx. After the system confirms that all data are valid, another pop-up window will ask the exposure scenario to be conducted, Typical level scenario (number 1) or Maximum Level scenario (number 2). Once the number is introduced, press OK, enter the number of your analysis, and a brief description. A pop-up windows should emerge informing that your analysis was successfully sent to the DietEx tool. Using DietEx tool via API 5 Now, the user can go to assess the exposure estimations in the DietEx tool online by accessing the EFSA website (https://www.efsa.europa.eu/en/science/tools-and-resources/dietex) or, alternatively, by using the button Open DietEx Online tool. A dedicated User Guide for the DietEx tool is found in the EFSA website (https://www.efsa.europa.eu/en/science/tools-andresources/dietex). In the spreadsheet “Control Panel” there is the button Refresh Foodex codes. This button allows aligning the FoodEx codes listed in the Excel file with those used by the DietEx tool. EFSA regularly updates the EFSA Comprehensive European Food Consumption Database and consequently the consumption data used by the DietEx tool. REFERENCES EFSA (European Food Safety Authority), Gutiérrez Linares A, SalvatoreS, Belmonte L, and Gómez Ruiz JA, 2025. Reporting guidance for use level data on food additives and food flavourings - 2025. EFSA supporting publication 2025:EN-9285. 26 pp.doi:10.2903/sp.efsa.2025.EN-9285.