How to detect "strikethrough" style from xlsx file in R

rane

I have to check the data which contain "strikethrough" format when importing excel file in R

Do we have any method to detect them ? Welcome for both R and Python approach

Wimpel

R-solution

the tidyxl-package can help you...

example test.xlsx, with data on A1:A4 of the first sheet. Below is an excel-screenshot:

enter image description here

library(tidyxl)

formats <- xlsx_formats( "temp.xlsx" )
cells <- xlsx_cells( "temp.xlsx" )

strike <- which( formats$local$font$strike )
cells[ cells$local_format_id %in% strike, 2 ]

# A tibble: 2 x 1
#   address
#   <chr>  
# 1 A2     
# 2 A4   

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章