Comments (7)
Please submit a PR if it would be useful to provide a helper function in the Clojure library that wraps a call to this formatter.
from docjure.
In general, Excel prefers numbers.
If you are up to it, you can have a look at the Docjure code to see how it reads the cell value. Maybe there is a clue there.
You can also try applying the clojure str
function to turn the data into strings.
from docjure.
Hi, tried the str function bit that just gives the floating point version in quotes!
I did look at the code. I'm not an expert but will think about submitting a change. My work around is to save the spreadsheet as a CSV and read that!
Thanks
from docjure.
I've tested in Excel. By default, number string is stored as number.
When the field with small green triangle, indicates it is a number stored as string:
from docjure.
"2014" in this file is treated as string.
1900-based-dates.xlsx
from docjure.
I noticed that when reading a 10-digit integer I would also get a floating-point number. I decided on a lark to format it using cl-format
(the formatting string used was "~14,'0d"
. It turns out that this will give me a 14-digit, zero left-padded string!
from docjure.
I ran into this also, and found an SO post, which points to org.apache.poi.ss.usermodel.DataFormatter.formatCellValue, which seems useful, based on the javadoc, if you want a string that looks the same as in Excel:
DataFormatter contains methods for formatting the value stored in a Cell. This can be useful for reports and GUI presentations when you need to display data exactly as it appears in Excel.
from docjure.
Related Issues (20)
- Generate documentation (on push) HOT 1
- Add documentation build and badge HOT 3
- Expose quotePrefixed style attribute in `create-cell-style!` HOT 2
- Reuse similar-looking CellStyles HOT 1
- New release needed to support auto-size-all-columns! documented in README.md HOT 1
- Make `dk.ative.docjure.spreadsheet/create-date-format` public
- Simplest way to place data HOT 2
- ODS file support HOT 4
- Working arond "Zip bomb detected!" HOT 1
- Error upgrading to 0.13 using java 1.8 HOT 3
- Automatically use header row to read tabular sheet HOT 1
- CVE-2019-12415 HOT 9
- Get index with select-columns HOT 1
- Writing on an empty cell HOT 2
- SKEW formula in Excel results in exception instead of :FUNCTION_NOT_IMPLEMENTED HOT 2
- Output a formula HOT 1
- Applying styles to multiple sheets? HOT 1
- Create save to stream example in documentation
- CVE-2022-26336: org.apache.poi/poi "4.1.1" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docjure.