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

Cells incorrectly identified as blank #92

Closed
lymanmark opened this issue Dec 20, 2023 · 2 comments · Fixed by #93
Closed

Cells incorrectly identified as blank #92

lymanmark opened this issue Dec 20, 2023 · 2 comments · Fixed by #93

Comments

@lymanmark
Copy link

When reading in the following file there are many cells with is_blank incorrectly set to TRUE. The main consequence for me is that character_formatted is also set to NULL in this instance, and I cannot properly handle superscript characters in the cells.

test.xlsx

tidyxl::xlsx_cells("test.xlsx") |>
  dplyr::filter(data_type == "character", is_blank)
#> # A tibble: 198 × 24
#>    sheet address   row   col is_blank content data_type error logical numeric
#>    <chr> <chr>   <int> <int> <lgl>    <chr>   <chr>     <chr> <lgl>     <dbl>
#>  1 Table K4          4    11 TRUE     <NA>    character <NA>  NA           NA
#>  2 Table M4          4    13 TRUE     <NA>    character <NA>  NA           NA
#>  3 Table N4          4    14 TRUE     <NA>    character <NA>  NA           NA
#>  4 Table O4          4    15 TRUE     <NA>    character <NA>  NA           NA
#>  5 Table P4          4    16 TRUE     <NA>    character <NA>  NA           NA
#>  6 Table Q4          4    17 TRUE     <NA>    character <NA>  NA           NA
#>  7 Table R4          4    18 TRUE     <NA>    character <NA>  NA           NA
#>  8 Table S4          4    19 TRUE     <NA>    character <NA>  NA           NA
#>  9 Table T4          4    20 TRUE     <NA>    character <NA>  NA           NA
#> 10 Table E5          5     5 TRUE     <NA>    character <NA>  NA           NA
#> # ℹ 188 more rows
#> # ℹ 14 more variables: date <dttm>, character <chr>,
#> #   character_formatted <list>, formula <chr>, is_array <lgl>,
#> #   formula_ref <chr>, formula_group <int>, comment <chr>, height <dbl>,
#> #   width <dbl>, row_outline_level <dbl>, col_outline_level <dbl>,
#> #   style_format <chr>, local_format_id <int>

Created on 2023-12-20 with reprex v2.0.2

@nacnudus
Copy link
Owner

That's an embarrassing bug. Thank you for providing a test case. I think it is fixed here, and can be installed with devtools::install_github(repo = "nacnudus/tidyxl"). I'll try to get it into CRAN before Christmas.

@lymanmark
Copy link
Author

lymanmark commented Dec 23, 2023 via email

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 a pull request may close this issue.

2 participants