Hi Thomas,
Perhaps this is what you are seeking:

my_read_excel<-function(filename) {
 serials<-read_excel(filename,sheet="Flow Data",range=("c6"))
 flow.data<-read_excel(filename,sheet="Flow Data",range=("c22:c70"))
 dates<-read_excel(filename,sheet="Flow Data",range=("h14"))
 return(data.frame(Serial=rep(serials,49),Date=rep(dates,49),
  Flow=flow.data),stringsAsFactors=FALSE)
}
lapply(files,my_read_excel)

Should return a list of data frames in the format you want. If you
want just one big data frame, rbind the results. You should also be
able to convert the dates from character to date type without striking
the factor problem.

Jim

On Sat, Dec 21, 2019 at 4:16 AM Thomas Subia <tsu...@imgprecision.com> wrote:
>
> Colleagues,
>
> The objective is to create a text file having this format:
>
> Serial  Date    Flow
>

______________________________________________
R-help@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.

Reply via email to