Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra content (<html> tag) was added to cell value which looks like a HTML tag #514

Open
cenxky opened this issue Sep 30, 2019 · 2 comments

Comments

@cenxky
Copy link

cenxky commented Sep 30, 2019

I found roo gem always adding extra content to the cell value while reading the cells via loops.

Steps to reproduce

  1. Create an xlsx file, and set the A1 cell value to be <b>Hello Roo</b>
  2. Parse the file by Roo::Excelx.new(file_path, packed: false, file_warning: :ignore) and puts cell values via each block
  3. You will realize the output value is <html><b>Hell Roo</b></html> rather than origin text <b>Hello Roo</b>

Issue

This situation looks weird, I just found it will add <html> at present, but I am not sure whether it also add something else to lead the reading value is not origin value. Pls have a look, and if you need some help, I will be pleased to do. Thanks!

System configuration

Roo version: 2.8.2

Ruby version: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin17]

@Kiwi-x-Kiwi
Copy link

Kiwi-x-Kiwi commented Mar 16, 2020

We're experiencing a similar issue with .xlsx files on cells where there is bold formatting and it'll give us the following output <html><b> </b>[cell text]</html>.

In the above case, the cell text is not bold but the formatting on the cell itself is bold. There doesn't seem to be any problems when all the text in the cell is bold.

This problem only started occurring after we upgraded from Roo 1.11.1.

Roo version: 2.8.0
Ruby version: ruby 2.5.5

@mario-amazing
Copy link

You can fix it with Roo::Excelx.new(path, disable_html_wrapper: true)
#392

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

No branches or pull requests

3 participants