Connect SAP and Excel in 4 simple steps [BEST METHOD]

thumbnail connect sap and excel

First activate the scripting in SAP, then activate the API SAP GUI in Excel, download the Excel connection file, change the server name and launch the connection !

Table of Contents

1. Enable the scripting in SAP

Open the SAP GUI Options –> Accessibility & Scripting –> Scripting

Tick the box “Enable scripting” and untick the others.

2. Activate API SAP GUI reference in Excel

a. Open Excel --> Developer tab --> Visual Basic

b. Got to Tools --> References

c. Activate the SAP GUI Scripting API :

You will find the sapfewse.ocx extension in one of those folders (depends on your SAP installation):

  • x86 (32 bits) : C:\Program Files (x86)\SAP\FrontEnd\SAPgui\sapfewse.ocx

  • x64 (64 bits) : C:\Program Files\SAP\FrontEnd\SAPgui\sapfewse.ocx

3. Download the Excel connection file and change the server name

a. Click on the link to get the Excel file with the connection :

b. Change the server name to your server :

You will find your server name here :

4. Connect Excel to SAP !

Clic on the button and …

… Tadam !

What it does :

  • Open SAP (if SAP is not opened)

  • Open a new session (if no session is opened)

  • Connect to this session, and writes /nmd04 in the transaction bar to show that it works !

Articles liés

Macros SAP GUI SANS CODER ?

Apprenez à enregistrer vos propres Macros SAP GUI en 3 étapes simples et SANS CODER Fonctionne quelle que soit votre version de SAP (tant que…