gdata (version 2.19.0)

installXLSXsupport: Install perl modules needed for read.xls to support Excel 2007+ XLSX format

Description

Install perl modules needed for read.xls to support Excel 2007+ XLSX format

Usage

installXLSXsupport(perl = "perl", verbose = FALSE)

Value

Either TRUE indicating that the necessary perl modules have been successfully installed, or FALSE indicating that an error has occured.

Arguments

perl

Path to perl interpreter (optional).

verbose

If TRUE, show additional messages during processing.

Warning

Excel file support is deprecated in gdata version 2.19.0, to be removed in the near future. At the user level, the functions installXLSXsupport, read.xls, sheetCount, sheetNames, xls2csv, xls2sep, xls2tab, xls2tsv, and xlsFormats now raise a warning about the functionality being deprecated.

Excel file support was first introduced in gregmisc/gdata 1.11.0 back in 2004, but today we have packages such as openxlsx, readxl, XLConnect, and xlsx offering dedicated Excel file support with more features. When Excel file support will be removed from the gdata package, it will result in lighter package maintenance and no more Perl warnings on the user side.

Details

This function calls the perl script 'install_modules.pl' located in the perl subdirectory of the gdata package directory (or inst/perl in the source package). This perl script attempts to use the perl 'CPAN' package, which should be included as part of most perl installations, to automatically download, compile, and install the Compress::Raw::Zlib and Spreadsheet::XLSX perl modules needed for read.xls to support support Excel 2007+ XLSX files into the gdata perl subdirectory.

Since the perl modules are installed into the gdata installation directory, the perl modules will be available until the gdata package is replaced or removed. Since this occurs each time a new version of gdata is installed, installXLSXsupport will need to be run each time a new version of the gdata package is installed.

Further, the binary Compress::Raw::Zlib package installed by installXLSXsupport is tied to the particular version of perl used to compile it, therefore, you will need to re-run installXLSXsupport if you install a different perl distribution.

This installation process will fail if 1) perl is not available on the search path and the perl argument is not used to specify the path of the perl executable, 2) the perl installation is not properly configured for installing binary packages*, 3) if the CPAN module is not present, or 4) if the C compiler specified by the perl installation is not present.

In particular, installXLSXsupport will fail for the version of perl included with the current RTools.zip package, which is not correctly configured to allow installation of additional perl packages. (The RTools version of perl is installed in a different directory than the perl configuration files expect.)

The function xlsFormats can be used to see whether XLS and XLSX formats are supported by the currently available perl modules.

See Also

read.xls, xls2csv, xlsFormats

Examples

Run this code
if (FALSE) {
   installXLSXsupport()
}

Run the code above in your browser using DataLab