[R] Last

Boris Steipe boris.steipe at utoronto.ca
Sun Apr 17 16:26:16 CEST 2016


Does 
  length(getSheets(loadWorkbook("las.xlsx"))
  
give you the index you need? (Untested).

B.


On Apr 17, 2016, at 9:43 AM, Val <valkremk at gmail.com> wrote:

> Hi all,
> 
> I am trying to read data from a particular  excel sheet.
> 
> library(xlsx)
> dat1=read.xlsx("las.xlsx", sheetIndex = 5)
> 
> I know that this is sheet is the last one and this number grows over time
> 
> When I run my script to read the last sheet then I have to change this
> number every time manually.
> 
> Is it possible to read the last sheet of an excel file?
> Thank yo in advance
> Val
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> 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.



More information about the R-help mailing list