Home Applications eap-sql2xlsx

eap-sql2xlsx

This application is not supported by InterSystems Corporation. Please be notified that you use it at your own risk.
5
1 reviews
0
Awards
320
Views
18
IPM installs
0
0
Details
Releases  (1)
Reviews  (1)
Issues
Articles  (3)
This app has a demo View
A simple example of using the python openxl library to export a

What's new in this version

Initial Release

Repo-GitHub
OEX-apptools-infochest

Docker-ports

eap-sql2xlsx

Gitter
GitHub all releases


Demo

What’s new

Added use of the fileserver and csvgen projects to demonstrate how to get a generated xlsx file

A simple example of using the python openxl library to export a request to an excel file

Requirements

IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2021.2 (Build 649U) Thu Jan 20 2022 08:53:15 EST

Installation with ZPM

If ZPM the current instance is not installed, then in one line you can install the latest version of ZPM.

zn "%SYS" d ##class(Security.SSLConfigs).Create("z") s r=##class(%Net.HttpRequest).%New(),r.Server="pm.community.intersystems.com",r.SSLConfiguration="z" d r.Get("/packages/zpm/latest/installer"),$system.OBJ.LoadStream(r.HttpResponse.Data,"c")

If ZPM is installed, then ZPM can be set with the command

zpm:USER>install eap-sql2xlsx

Installation with Docker

Prerequisites

Make sure you have git and Docker desktop installed.

Installation

Clone/git pull the repo into any local directory

$ git clone https://github.com/SergeyMi37/eap-sql2xlsx

Open the terminal in this directory and run:

$ docker-compose build
  1. Run the IRIS container with your project:
$ docker-compose up -d
...
$ docker-compose exec iris iris session iris

The following commands will be executed during the installation process

USER>zpm "install csvgen"
...
USER>do ##class(community.csvgen).GenerateFromURL("https://raw.githubusercontent.com/datasciencedojo/datasets/master/titanic.csv",",","Data.Titanic")

Class name: Data.Titanic
Header: PassengerId INTEGER,Survived INTEGER,Pclass INTEGER,Name VARCHAR(250),Sex VARCHAR(250),Age INTEGER,SibSp INTEGER,Parch INTEGER,Ticket VARCHAR(250),Fare MONEY,Cabin VARCHAR(250),Embarked VARCHAR(250)
Records imported: 891

USER>do ##class(dc.msw.py.xlsx).sql2xlsx("select * FROM Data.Titanic","","/usr/irissys/mgr/Temp/titanic.xlsx")

Save into /usr/irissys/mgr/Temp/titanic.xlsx rows: 891

USER>zpm "install fileserver"
...
USER>do ##class(Fileserver.File).AddFile("/usr/irissys/mgr/Temp/titanic.xlsx")

The generated file can be obtained from the interface via the link

http://localhost:52663/fileserver/files

Container for this project deployed to the cloud for demonstration

Demo

Made with
Install
zpm install eap-sql2xlsx download archive
Version
1.0.027 Jun, 2021
ObjectScript quality test
Category
Technology Example
Works with
InterSystems IRISInterSystems IRIS for Health
First published
27 Jun, 2021
Last checked by moderator
15 Oct, 2024Works