Comments (2)
from docjure.
This issue slipped my mind. I have been using the escape function with no trouble for a number of months, and I wanted to contribute it back.
I did some more digging.
Spreadsheets that are in the xls
format do not seem to be affected:
dk.ative.docjure.spreadsheet-test> (let [sheet-name "Sheet 1"
sheet-data [["A1"]]
workbook (create-xls-workbook sheet-name sheet-data)
a1 (-> workbook (.getSheetAt 0) (.getRow 0) (.getCell 0))]
(set-cell! a1 "foo_x220F_bar")
(.getStringCellValue a1))
"foo_x220F_bar"
The sequence is also case sensitive, this is demonstrates the replacement:
dk.ative.docjure.spreadsheet-test> (let [sheet-name "Sheet 1"
sheet-data [["A1"]]
workbook (create-workbook sheet-name sheet-data)
a1 (-> workbook (.getSheetAt 0) (.getRow 0) (.getCell 0))]
(set-cell! a1 "foo_x220F_bar")
(.getStringCellValue a1))
"foo∏bar"
The 16-bit hex sequence must use upper case letters or replacement doesn't happen. For example, if using _x220f
:
dk.ative.docjure.spreadsheet-test> (let [sheet-name "Sheet 1"
sheet-data [["A1"]]
workbook (create-workbook sheet-name sheet-data)
a1 (-> workbook (.getSheetAt 0) (.getRow 0) (.getCell 0))]
(set-cell! a1 "foo_x220f_bar")
(.getStringCellValue a1))
"foo_x220f_bar"
The leading _x
must be lowercase as well:
dk.ative.docjure.spreadsheet-test> (let [sheet-name "Sheet 1"
sheet-data [["A1"]]
workbook (create-workbook sheet-name sheet-data)
a1 (-> workbook (.getSheetAt 0) (.getRow 0) (.getCell 0))]
(set-cell! a1 "foo_X220F_bar")
(.getStringCellValue a1))
"foo_X220F_bar"
I created this PR: #65
It adds the escape-cell
function and some unit tests. I didn't see the need to alter any existing behaviour of the docjure code. A user running into this issue should be able to find escape-cell
and the docstring there explains the issue.
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
- Numeric text string being read as float HOT 7
- 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.