1

I want an api which can upload a xlsx file,which select by the user.The api should take any xlsx file as a input.

1 Answer 1

1
#* @post /upload_excel
#* @param f:file
#* @param sheet:str
#* @param range:str
function(f, sheet, range) {

  tmp <- tempfile("plumb", fileext = paste0("_", basename(names(f))))
  on.exit(unlink(tmp))
  writeBin(f[[1]], tmp)
  t <- readxl::read_excel(tmp, sheet, range)
  nrow(t)
}
3

Not the answer you're looking for? Browse other questions tagged or ask your own question.