Skip to content

Conversation

kommradHomer
Copy link

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
Copy link

Bzil commented Jun 10, 2021

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

cc @StanBertrand

@nexuszjq
Copy link

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
Contributor

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

@nexuszjq
Copy link

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
Copy link
Contributor

pjfanning commented May 25, 2022

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