Questions tagged [jxl]

Java Excel API - A Java API to read, write, and modify Excel spreadsheets

From http://jexcelapi.sourceforge.net/:

Java Excel API is a mature, open source java API enabling developers to read, write, and modifiy Excel spreadsheets dynamically. Now java developers can read Excel spreadsheets, modify them with a convenient and simple API, and write the changes to any output stream (e.g. disk, HTTP, database, or any socket). Any operating system which can run a Java virtual machine (i.e., not just Windows) can both process and deliver Excel spreadsheets. Because it is Java, the API can be invoked from within a servlet, thus giving access to Excel spreadsheets over internet and intranet web applications.

455 questions
5
votes
3 answers

java to excel date formatting

The problem is when I'm running my application and have a grid (with strings and date columns) and save it as an excel file. When I save it for the first time everything is correctly formatted, but when I try to save the same exact grid again a…
samligo
  • 51
  • 1
  • 1
  • 2
5
votes
2 answers

Adding a comment to a cell in an Excel file with Java using jxl library

I am trying to add a comment to a cell in Excel. I am using jxl library to do that: cell = sheet.getWritableCell(1, 2); // cols, rows WritableCellFeatures wcf = cell.getWritableCellFeatures(); wcf.setComment("comment2"); The last line…
Hurdler
  • 891
  • 3
  • 15
  • 30
4
votes
2 answers

smallest valid base64 AVIF image

I would like to find the smallest possible, but valid (viewable) base64 encoded AVIF string for testing browser image support with javaScript. I'm using this set: const imgs = { jxl: "/wr6HwGRCAYBAFAASzhB5k11/Ia1kyog0AHeH0nCAVw=", avif:…
stenito
  • 51
  • 2
4
votes
2 answers

Problem when using JXL Formula like SUM() AVG() STDEV() returns #VALUE! when it refers values from another sheet

I want to populate some values in a sheet and then use jxl Formula to get the values from that sheet and write it to another sheet... When I try to run this sample code String filename = "C:\\input.xls"; WorkbookSettings ws = new…
Balaji.N.S
  • 745
  • 3
  • 13
  • 28
4
votes
2 answers

Jxl and maximum number of formatted cells

When I'm writing Excel files with jxl and use your own cell format, I get this warning: The maximum number of formatted cells has exprired. Using default format". I have about 350 cells that need to be formatted, which seems relatively little to me.…
mjgirl
  • 151
  • 1
  • 3
  • 7
4
votes
1 answer

how to stop and start execution of for loop

I am creating framework for our project, BEFOREMETHOD (reads first row using JXl) @BeforeMethod public void Test2() throws BiffException, IOException{ FileInputStream filepath = new…
sameer joshi
  • 377
  • 2
  • 8
  • 27
4
votes
2 answers

Writing 1 million records to an excel file

I am trying to write 1 million rows to and excel file using Java (I have to create an xls or xlsx). Both Jxl and POI seem to be in-memory APIs, i.e both the apis will have the entire file of 1 million rows in the memory at a time. This will end up…
ParoTech
  • 347
  • 2
  • 15
4
votes
2 answers

Setting JXL custom Font

How to add custom fonts in JXL? Apart from the one's available by default? public static final FontName ARIAL = new FontName("Arial"); public static final FontName TIMES = new FontName("Times New Roman"); public static final FontName COURIER = new…
varunrao321
  • 925
  • 2
  • 10
  • 18
4
votes
2 answers

struts 2 Can not find a java.io.InputStream with the name [excelStream] in the invocation stack

excelStreamI am trying to download an excel file. In my Action class public class ActivityTrackerExlReportAction extends BaseAction { private InputStream excelStream; private UserMasterDTO userMasterDTO; public InputStream getExcelStream() { …
Akhilesh N
  • 89
  • 3
  • 4
  • 12
4
votes
2 answers

How to read an excel file, sheet by sheet using jxl

I'm working on a utility to convert excel file from one format to another. I was suggested to use jxl library to meet the requirements which are as follows.read the file sheet by sheet and do following get the sheet name, make it key of a map and…
moCap
  • 969
  • 1
  • 14
  • 31
4
votes
1 answer

Reading content from an Excel file

package jexcel.jxl.nimit; import java.io.*; import jxl.Cell; import jxl.Sheet; import jxl.Workbook; import jxl.read.biff.BiffException; import jxl.read.biff.File; public class ExampleJxl { /** * @param args */ …
Nimit_ZZ
  • 495
  • 4
  • 10
  • 21
4
votes
2 answers

Access rights to an Excel file created with Java

I’m creating an Excel file and it should be read-only. To do this I use: (sheetName).getSettings().setProtected(true); for every new sheet added. Only someone with admin rights can get full access to the file, so after confirming a user has admin…
Hurdler
  • 891
  • 3
  • 15
  • 30
3
votes
1 answer

Library for working with Excel - jxl?

How reliable and powerful is jxl? I'm trying to create an excel file from Java, performing operations like merging cells, creating graphs, setting different background colours (with gradients) - basing on information I collect from the user. Also, I…
Hurdler
  • 891
  • 3
  • 15
  • 30
3
votes
1 answer

JXL Attempt to modify a referenced format while setting background color

While trying to execute the below code: Colour selectedColour = Colour.WHITE; myWritableCellFormat.setBackground(selectedColour); I am getting this Exception: jxl.write.biff.JxlWriteException: Attempt to modify a referenced format Why is this?…
Stefanos Kargas
  • 10,547
  • 22
  • 76
  • 101
3
votes
2 answers

JXL rename a sheet

Hi I have a template excel which I load and would like to change a sheet name in that. WritableWorkbook workbook = jxl.Workbook.createWorkbook(file1,template); This workbook has n sheets. I would like to change the name of a single sheet. Incase of…
Balaji.N.S
  • 745
  • 3
  • 13
  • 28
1 2
3
30 31