Home Applications excel-java-iris

excel-java-iris

InterSystems does not provide technical support for this project. Please contact its developer for the technical assistance.
5
2 reviews
0
Awards
371
Views
18
IPM installs
0
0
Details
Releases (6)
Reviews (2)
Issues
Articles (1)
Dependencies (1)
This app has a demo View
Java code to read Excel

What's new in this version

Add Dependency in ZPM Module

excel-java-iris

This repo contains a java routine to read data from Excel 95, 97, 2000, XP, and 2003 workbooks and write the data into IRIS globals using Java Native API library.

Install iris-globals-contest package via ZPM package deployment. This provides persistent class for transactions and CSP pages.

New otw.iris.excel class imports data from ^excel global into dc.iris.transact table.

You can find Online Demo here.

Prerequisites

Make sure you have git and Docker desktop installed.

Installation: Docker

Clone/git pull the repo into any local directory

$ git clone https://github.com/oliverwilms/excel-java-iris.git

Open the terminal in this directory and run:

$ docker-compose up -d

Run java code to read an excel file and populate IRIS global

$ docker-compose exec -it iris java IRISNative

Press Enter to accept the default /opt/irisapp/excel/money.xls.

>>> Input File [/opt/irisapp/excel/money.xls]

screenshot

IRIS session

$ docker-compose exec -it iris iris session iris

See data from Excel workbook in IRIS global

USER>zw ^excel
^excel(0,0,0)="Date"
^excel(0,0,1)="Check"
^excel(0,0,2)="Merchant"
^excel(0,0,3)="Category"
^excel(0,0,4)="SubCategory"
^excel(0,0,5)="Memo"
^excel(0,0,6)="Credit"
^excel(0,0,7)="Debit"
^excel(0,0,8)="Account"
^excel(0,0,9)="Status"
^excel(0,1,0)="27-Nov"
^excel(0,1,1)=101
^excel(0,1,2)="Landlord"
^excel(0,1,3)="Business Expense"
^excel(0,1,4)="Rent"
^excel(0,1,5)="December"
^excel(0,1,7)=250
^excel(0,1,8)="Checking"
^excel(0,2,0)="27-Nov"
^excel(0,2,2)="Aldi"
^excel(0,2,3)="Groceries"
^excel(0,2,5)=16
^excel(0,2,7)=54.35
^excel(0,2,8)="Checking"

Import Excel data from IRIS global into IRIS persistent class

USER>w ##class(otw.iris.excel).importExcel(-1)
1

I added -1 above because I want to start importing with sheet 0. In my personal Excel workbook, I want to skip the first five workbooks.

See data from Excel workbook in IRIS SQL table

screenshot

Utilize iris-globals-contest for counting Transactions

USER>do ##class(dc.iris.count).Count()
11592 Transactions counted.

Export global

USER>do $System.OBJ.Export("COUNT.GBL","/opt/irisapp/globalCOUNT.xml",,.errors)

Exporting to XML started on 09/01/2025 14:34:37 Exporting global: ^COUNT Export finished successfully.

Last checked by moderator
27 Jan, 2026Works
Made with
Install
zpm install excel-java-iris download archive
Version
0.0.704 May, 2025
Ideas to the app
Category
Technology Example
Works with
InterSystems IRIS
First published
25 Nov, 2023
Last edited
04 May, 2025