support: Customer Portal
Focused on delivering choice, investment protection and flexibility to organizations with valuable COBOL assets
 

Veryant Knowledge Base
Home > All Categories > isCOBOL General > Interfacing with Java Programs > How to create and write an excel spreadsheet playing with different attributes like font, color, format, highlight, etc?.
Question Title How to create and write an excel spreadsheet playing with different attributes like font, color, format, highlight, etc?.

Here are the steps to compile and run the attached sample COBOL program (in xlsx.zip) which will create an Excel spreadsheet and change the format, font, color and highlight some of the cells. This sample uses Apache POI based on the POI API documentation
In order to modify this sample program, we recommend to use the IDE due to the fact it is easier to build a source program that uses external java libraries, since isCOBOL IDE Editor allows to get the name/fields methods of the class/object reference thanks to the "Content Assistant" facility.

1. Extract the attached zip file, xlsx.zip, into a directory
2. Import the project to the IDE
3. The project contains the sample program called xlsx.cbl
4. Compile and execute the program XLSX.cbl, after the execution you will find an Excel spreadsheet called excel-file.xlsx in the output folder of the project.

From the command line, you just need to compile with iscc xlsx.cbl and execute it with iscrun XLSX.class.

This sample program can be compiled and executed from the command from 2016R1 version; earlier versions require POI libraries to be installed separately.

Authored by: Veryant Support This question has been viewed 3582 times so far.
Click Here to View all the questions in Interfacing with Java Programs category.
File Attachments File Attachments
How helpful was this article to you?
User Comments User Comments Add Comment
There are no user comments for this question. Be the first to post a comment. Click Here
Related Questions Related Questions
  1. Example of COBOL using Java classes to get date and time zone information
  2. We plan to replace our CICS screens with Java dialogs. How will the COBOL structures be passed between the Java dialogs and the other COBOL programs?
Article Information Additional Information
Article Number: 289
Created: 2017-12-12 10:55 AM
Rating: 5 Stars
 
Article Options Article Options
Print Question Print this Question
Email Question Email Question to Friend
Export to Adobe PDF Export to PDF File
Export to MS Word Export to MS Word
Bookmark Article
Subscribe to Article Subscribe to Article
 
Search Knowledge Base Search Knowledge Base



 
 

© Veryant - All Rights Reserved
Veryant and isCOBOL are trademarks or registered marks of Veryant in the United States and other countries. All other marks are the property of their respective owners.