Read batch of Excel xlsx-files
readXlsxBatch
reads data out of multiple xlsx files, the sheet indicated by 'sheetInd' will be considered.
All files must have a very similar organization of data, as this is typically the case when high-throughput measurments are automatically saved while the screen progresses.
The file-names will be used to structure the data read.
By default all columns with text-content may be eliminated to extract the numeric part only, which may then get organized to a 3-dim array.
NOTE : requires package xlsx being installed ! Uses a considerable amount of RAM ! Reading multiple xlsx files does take some time.
readXlsxBatch( fileNames = NULL, path = ".", fileExtension = "xlsx", excludeFiles = NULL, sheetInd = 1, checkFormat = TRUE, returnArray = TRUE, columns = c("Plate", "Well", "StainA"), simpleNames = 3, silent = FALSE, callFrom = NULL )
fileNames |
(character) provide either explicit list of file-names to be read or leave |
path |
(character) there may be a different path for each file |
fileExtension |
(character) extension of files (default='xlsx') |
excludeFiles |
(character) names of files to exclude (only used when reading all files of given directory) |
sheetInd |
(integer) specify which sheet to extract (must be number, eg |
checkFormat |
(logical) if |
returnArray |
(logical) allows switching from array to list-output |
columns |
(NULL or character) column-headers to be extracted (if specified, otherwise all columns will be extracted) |
simpleNames |
(integer), if |
silent |
(logical) suppress messages |
callFrom |
(character) allows easier tracking of message(s) produced |
list
path1 <- system.file("extdata",package="wrMisc") fiNa <- c("pl01_1.xlsx","pl01_2.xlsx","pl02_1.xlsx","pl02_2.xlsx") datAll <- readXlsxBatch(fiNa,path1) str(datAll) datAll2 <- readXlsxBatch(path=path1,silent=TRUE) identical(datAll,datAll2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.