2

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 XLConnect there is a function getCellStyle 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.

zx8754
  • 52,746
  • 12
  • 114
  • 209
Barbara
  • 1,118
  • 2
  • 11
  • 34
  • Is strikeout the same as strikethrough? And would you like to disregard the style altogether or do you need to know if a number had a strikethrough? – ekstroem Sep 21 '17 at 14:36
  • @ekstroem yes, it's the same thing, I have found it referenced in different way. I need to exclude all rows with a strikethrough when I import the excel file into a data frame. – Barbara Sep 21 '17 at 14:57

1 Answers1

1

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.
Barbara
  • 1,118
  • 2
  • 11
  • 34