Skip to content

added StreaminCell.getRawContents()#226

Open
kommradHomer wants to merge 1 commit into
monitorjbl:masterfrom
kommradHomer:master
Open

added StreaminCell.getRawContents()#226
kommradHomer wants to merge 1 commit into
monitorjbl:masterfrom
kommradHomer:master

Conversation

@kommradHomer

Copy link
Copy Markdown

our customers usually upload excel files with phone numbers in numeric cells. Getting the raw content is the only healthy way to get the phone number, without any modification. I'm sure many will find the rawContents to be the solution in hopeless cases

@Bzil

Bzil commented Jun 10, 2021

Copy link
Copy Markdown

@monitorjbl it's possible to merge and release this?

cc @StanBertrand

@nexuszjq

Copy link
Copy Markdown

Our project upgraded xlsx-streamer version from 1.0.0 to 2.1.0 for fixing vulnerabilities, but we found out StreaminCell.getRawContents() has been removed. Will this method be added back or provide a way to replace it in the future?

@pjfanning

Copy link
Copy Markdown
Contributor

could you use 'public double getNumericCellValue()' on Cell instead?

@nexuszjq

Copy link
Copy Markdown

could you use 'public double getNumericCellValue()' on Cell instead?
Thanks for reply, I hope to get the 'rawContents' and convert it to 'String', use like this: '(String) streamingCell.getRawCotents()'.
Can I use 'public String getStringCellValue()' instead?

@pjfanning

pjfanning commented May 25, 2022

Copy link
Copy Markdown
Contributor

Use POI DataFormatter to get the Cell content as a String that matches what appears in the Excel file. https://poi.apache.org/apidocs/dev/org/apache/poi/ss/usermodel/DataFormatter.html#formatCellValue-org.apache.poi.ss.usermodel.Cell-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants