Giter VIP home page Giter VIP logo

sjxlsx's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sjxlsx's Issues

Streaming without going through a file?

I'm trying to use this library in order to generate an execel file on the fly. The end goal is not to generate an excel file on disk but rather generate it from a database and push it to an outputstream. Thus this doesn't make any sense to me:

File file = ..
SimpleXLSXWorkbook workbook = new SimpleXLSXWorkbook(file);

Why do I need the file? I've tried to just generate an empty file like this:

File file = Files.createTempFile(UUIDUtil.newUUID(), "xlsx").toFile();
SimpleXLSXWorkbook workbook = new SimpleXLSXWorkbook(file);

but this throws:

java.lang.RuntimeException: java.util.zip.ZipException: zip file is empty

Do you require an existing valid excel file for this to work?

How support Name manager

In POI, we can getName() from workbook, is it possible in sjxlsx?
if not, can you give some suggestion how implement this function.

Merge / Combine Cell

When you get some value of the some cell, and this cell is a merge/combine cell, just the first row get data, the other rows, get null/empty value.

We found a problem with some content in $filename. Do you want us to try and

I'm using this library to modify an existing workbook. After writing any data to any sheet, all comments in the workbook are removed, along with all formatting on any worksheet that we have written to. This includes, but may not be limited to, column/row sizes, and cell text/background color.

After opening this workbook Excel gives a notification saying "We found a problem with some content in $filename. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes."

Date Cell

When I try to getValue() from a date cell, the returned value is an integer.

How can I obtain the date value from a date cell ?

Sheet index - XLSX

When you need get data in other sheet different 0 you can't get because you can't pass index sheet

XMLStreamException: Stream encoding error

I have the issue when calling workbook.commit() when trying to save the file. It says there is an encoding error, but only after writing individual characters to the second sheet of the workbook.

You can find the source on our github below, line 40 can be commented out and it runs fine.

https://github.com/nth-solutions/JavaDashboardMaster/blob/development/src/dataorganizer/SpreadSheetController.java

Heres the stack trace too:

Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: javax.xml.stream.XMLStreamException: Underlying stream encoding 'Cp1252' and input paramter for writeStartDocument() method 'UTF-8' do not match.
at com.incesoft.tools.excel.xlsx.SimpleXLSXWorkbook$Commiter.endCommit(SimpleXLSXWorkbook.java:947)
at com.incesoft.tools.excel.xlsx.SimpleXLSXWorkbook.commit(SimpleXLSXWorkbook.java:1089)
at dataorganizer.SpreadSheetController.save(SpreadSheetController.java:71)
at dataorganizer.SpreadSheetController.main(SpreadSheetController.java:41)
Caused by: java.lang.RuntimeException: javax.xml.stream.XMLStreamException: Underlying stream encoding 'Cp1252' and input paramter for writeStartDocument() method 'UTF-8' do not match.
at com.incesoft.tools.excel.xlsx.SimpleXLSXWorkbook$Commiter.mergeSheets(SimpleXLSXWorkbook.java:980)
at com.incesoft.tools.excel.xlsx.SimpleXLSXWorkbook$Commiter.endCommit(SimpleXLSXWorkbook.java:939)
... 3 more
Caused by: javax.xml.stream.XMLStreamException: Underlying stream encoding 'Cp1252' and input paramter for writeStartDocument() method 'UTF-8' do not match.
at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeStartDocument(Unknown Source)
at com.incesoft.tools.excel.xlsx.SheetCommentWriter.writeStart(SheetCommentWriter.java:49)
at com.incesoft.tools.excel.xlsx.SheetCommentWriter.writeComment(SheetCommentWriter.java:128)
at com.incesoft.tools.excel.xlsx.Sheet$SheetWriter.writeCell(Sheet.java:604)
at com.incesoft.tools.excel.xlsx.Sheet$SheetWriter.writeRow(Sheet.java:581)
at com.incesoft.tools.excel.xlsx.Sheet.mergeSheet(Sheet.java:665)
at com.incesoft.tools.excel.xlsx.SimpleXLSXWorkbook$Commiter.mergeSheets(SimpleXLSXWorkbook.java:975)
... 4 more

How to write number cell using xlsx workbook

First of all i would like to thank you for this code base provided for huge excel writing in java.
I want to write a cell with number(integer,float,double)value as ,while we are writing the number into string in the excel it is showing some warnings.

I think in xml writer class or sharedstringtext class should be modified for this.

Kindly give me the solution for this problem

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.