I’m going to show the basic steps to get ADF Desktop Integration (ADFDI) Excel workbook running. Here is what we need to accomplish:
- Create Fusion web application with some ADF bussiness components in model layer.
- Create ADFDI page definition file. This one will be dedicated for excel and provide necessary bindings to be utilised by ADFDI Excel components.
- Create special kind (ADFDI) of Excel workbook. Bind it to application, particular page definition file.
- Run and see data loaded into Excel worksheet.
So lets elaborate each of the steps.
- Create application
I’m aiming to show here just a basic process how ADFDI gets into action. So demo application will be a tiny one, which only reads data from DB table and shows it in excel. How data can be manipulated, I mean full CRUD operations, I’m elaborating in separate posts:
- How to insert new record in ADF Desktop integration (ADFDI) Excel workbook? (comming soon)
- How to update a record in ADF Desktop integration (ADFDI) Excel workbook table component?
- How to delete a record in ADF Desktop integration (ADFDI) Excel workbook? (comming soon)
I’m not about to go through basic steps how to create ADF application, just want to mention view object which we’ll use for ADFDI. Oracle HR demo schema will be utilised for this sample. We’ll expose in excel employees table, which is covered by VO EmployeesView.
2. Create ADFDI page definition file. This step is described in the post – How to prepare ADF Desktop Integration (ADFDI) bindings to be utilised by Excel worksheet?
3. Now its time to setup Excel workbook which will utilise recently created binding:
- Open MS Excel where ADFDI plugin is already installed. If you haven’t done it yet, please check this post – How to install ADF Desktop Integration (ADFDI) plugin?
- Enable ADFDI for excel workbook:
- Create new blank workbook.
- Locate Oracle ADF ribbon menu
- Click on Workbook Properties
- Click OK in confirmation popup
- Locate and select JDeveloper application home folder
- In general Workbook properties window:
- Provide application root URL (in the screenshot you see localhost specified, but please change it if your application runs on different machine that Excel)
- Provide name of view controller project
- Provide web page folder
- Associate excel worksheet with page definition file. Afterwards, bindings should appear in the ADFDI workarea on the right side of the worksheet:
- Insert ADFDI table component into excel worksheet:
- Drag and Drop EmployeesView1 into worksheet
- Select ADF Table in the popup
- Confirm displayed table properties by clicking OK
- Agree to create default ribbon commands by clicking YES
4. Time for testing. We can do it in two ways:
- Run directly in development workbook. However it is used just by developers for testing purposes.
- Publish excel workbook, redeploy application and access it through particular URL where you did place a published one. This method is the only one for production.
Whichever way you choose, after running excel workbook you’ll see empty sheet. Data download needs to be explicitly requested:
So here it is! We have data displayed after clicking on Download. If you want it to appear automatically just after opening workbook, please check this post how to set it up – How to configure ADF Desktop Integration (ADFDI) worksheet to load data automatically on opening?
Demo application can be downloaded here.
ADF Version 22.214.171.124.0