Barbara Barbara - 25 days ago 7
R Question

Import cells without strikeout from xlsx

I'm trying to import an excel file avoiding cell that have a strikeout as style, but I'm not sure of how to do it.

I know that in the library

there is a function
but I cannot find much documentation on how to use it with a strikethroug/strikeout and I would like to avoid that library because sometimes it gives me problems when the workbook is big.

Answer Source

I found a workaround to this problem:

  1. I have a VBA macro to remove the strikethrough and that iterates through all the sheets. Code available here
  2. I embedded the first macro into another one that applies the changes to all files in a folder that the user can select (you can skip this step if you need it just for one file). Code available here.
  3. I call the macro from R. Code here.