-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unwanted *printed* output from read_excel #82
Comments
Just noticed that if I save the file as xlsx then the problem goes away. |
I think this has to do with the way For future reference, the |
Hi! Found another example of this.
outputs:
Excel name manager does not report and defined names or ranges in that file name - for whatever that's worth! Super helpful package. Thanks for all your work on this-- |
It looks like it could be a named range or a global function. |
Also close tidyverse#82
I have filed an issue with libxls: https://sourceforge.net/p/libxls/bugs/27/ |
I already filed one and implemented it GitHub. They are debating whether to include my changes upstream. |
+1 for addressing this |
I am still running into this issue with I can't find a way to suppress the
Update with workaround: e.g. a function if (require(readxl)) {
read_all_sheets <- function(filename, rowsToSkip = 0) {
capture.output(sheets <- excel_sheets(filename),
file = "/dev/null")
capture.output( # I need to do this because of the crappy `DEFINEDNAME` output
x <- lapply(sheets, function(y) read_excel(filename, sheet = y,
skip = rowsToSkip)),
file = "/dev/null")
names(x) <- sheets
return(x)
}
} This is a modification on this Stack Overflow answer. |
The upstream project, libxml, seems to be dormant: No commits for a year, no reaction to the issue I filed. |
Using the fix found at tidyverse/readxl#82 (comment) to write the output to the null file. Should work on either Windows, Linux, and Mac OSX at the least.
I recently ran into this issue. Similar in spirit to the solution above, I ended up masking the readxl functions in my global env with these silenced versions. Leaving this here in case anyone else runs into the same issue
|
Another +1 for this issue. I'm using the same workaround posted above for now:
I'm reading an .xls (not .xlsx) and my sessionInfo is: Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.6 (El Capitan)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] lubridate_1.5.6 readxl_0.1.1 magrittr_1.5 data.table_1.9.6 ggplot2_2.2.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.6 assertthat_0.1 chron_2.3-47 grid_3.3.1 plyr_1.8.4
[6] gtable_0.2.0 formatR_1.4 scales_0.4.1 stringi_1.1.1 lazyeval_0.2.0
[11] tools_3.3.1 stringr_1.1.0 munsell_0.4.3 colorspace_1.2-6 knitr_1.14
[16] tibble_1.1 ``` |
read_excel prints lines unrelated to the output:
file to use for example (tst_case.xls):
https://drive.google.com/uc?export=download&id=0B_h1BO3hBg0gX0lhSU5SQXBvd1E:
code:
The text was updated successfully, but these errors were encountered: