How to search within excel workbook programmatically using R?
Say I want to locate string "foo" and return all the cell addresses (row, col, worksheet name) where the text resides.
Is there any convenience function, instead of writing own script using xlsx::read.xlsx
or XLConnect::readWorksheet
?
To give a little background, I want to extract only specific regions, which I need to specify somehow.
Extracting specific regions is supported by both read*
functions mentioned above, however they require as input the row and column indices, whereas what I know beforehand are only some keywords (representing table column headings). Example: I know there will be data about "exposure"
or "weight"
organized as column region with the said heading, but don't know exactly where, so want to auto-detect and extract that.