On 5/4/2015 9:01 AM, Marc Girondot wrote:> Dear list-members,
>
> Since I update gdata library to 2.16.1 version this morning, I have an
> error on the two macs I use (details on system and R versions at the
> end).
>
> When I load the package, I have this error:
>
> > library("gdata",
>
lib.loc="/Library/Frameworks/R.framework/Versions/3.2/Resources/library")
> gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED.
>
> gdata: Unable to load perl libaries needed by read.xls()
> gdata: to support 'XLSX' (Excel 2007+) files.
>
> gdata: Run the function 'installXLSXsupport()'
> gdata: to automatically download and install the perl
> gdata: libaries needed to support Excel XLS and XLSX formats.
>
> Then if I try installXLSXsupport(), I get another error:
> > installXLSXsupport()
> Error in installXLSXsupport() :
> Unable to install Perl XLSX support libraries.
>
> But my perl system seems to be ok:
> > system("perl -v")
>
> This is perl 5, version 16, subversion 3 (v5.16.3) built for
> darwin-thread-multi-2level
>
> and the perl folder is correctly located in
> /Library/Frameworks/R.framework/Versions/3.2/Resources/library/gdata/perl/
>
> And of course if I try to use read.xls, I get an error (xxx.xlsx is a
> valid file):
> > info <- read.xls("xxx.xlsx"), stringsAsFactors=FALSE)
> WARNING: Perl module Spreadsheet::ParseXLSX cannot be loaded.
> WARNING: Microsoft Excel 2007 'XLSX' formatted files will not be
> processed.
>
> Does someone have a solution ? (other than saving file in .csv ! )
>
Don't know about this problem, but much has been written on various
alternatives (e.g., http://www.milanor.net/blog/?p=779)
One of their suggestions is (cross-platform, java-based solution),
require(XLConnect)
wb=loadWorkbook("myfile.xlsx")
df=readWorksheet(wb,sheet="Sheet1",header=TRUE)
> Thanks
>
> Marc
>
> ####################
> R version 3.2.0 Patched (2015-05-01 r68301) -- "Full of
Ingredients"
> Copyright (C) 2015 The R Foundation for Statistical Computing
> Platform: x86_64-apple-darwin13.4.0 (64-bit)
>
> OS: MacOSX - Yosemite
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Robert W. Baer, Ph.D.
Professor of Physiology
Kirksville College of Osteopathic Medicine
A T Still University of Health Sciences
800 W. Jefferson St
Kirksville, MO 63501
rbaer(at)atsu.edu