问题
When I attempt to load an xlsx file with the loadWorkbook function I receive an error message. I am loading the workbook file from my local working directory and receive the following error message:
Error in grepl(target, commentsXML) : invalid 'pattern' argument
when I execute the basic function: loadWorkbook("template.xlsx") -> wb
回答1:
To me it looks as if it's a bug. If you look at the source on github it has the following line:
hasComment <- sapply(drawXMLrelationship, length) > 0 ## which sheets have a drawing
However, it should be:
hasComment <- sapply(commentXMLrelationship, length) > 0
来源:https://stackoverflow.com/questions/47850646/trouble-with-openxlsx