title: How to store inputed table shiny
body: <p>I have this shiny app. The main aim is to upload excel sheet with data and plot some graphs in tabs. User is able to select a sheet to make the graph. The seet will render to observe the selected data. This works well.</p>
  <p>But I am struggling to manipulate with input data to make the graph.</p>
  <p>I tried to use reactive value named data and then make the graph from that. I am quite new with shiny apps.</p>
  <p>library(shiny)
  library(readxl)
  library(dplyr)
  library(tidyverse)
  library(lubridate)</p>
  <pre><code>ui &lt;- fluidPage(
    titlePanel(&quot;OTD project update&quot;),
    sidebarPanel(
      fileInput('file1', 'Insert File', accept = c(&quot;.xlsx&quot;)),
      textInput('file1sheet','Name of Sheet (Case-Sensitive)')),
    mainPanel(tabsetPanel(
      type = &quot;tabs&quot;,
      tabPanel(&quot;Data&quot;, tableOutput(&quot;value&quot;)),
      tabPanel(&quot;OTD&quot;, plotOutput(&quot;OTD&quot;))        
      )   
    )
  )
  
  server &lt;- function(input, output) {
      
    sheets_name &lt;- reactive({
      if (!is.null(input$file1)) {
        return(excel_sheets(path = input$file1$datapath))  
      } else {
        return(NULL)
      }
    })
    
    output$value &lt;- renderTable({
      if (!is.null(input$file1) &amp;&amp; 
          (input$file1sheet %in% sheets_name())) {
        return(read_excel(input$file1$datapath, 
                          sheet = input$file1sheet))
      } else {
        return(NULL)
      }
    })
    
    
    data &lt;- reactive({
      if (!is.null(input$file1) &amp;&amp; 
          (input$file1sheet %in% sheets_name())) {
        return(read_excel(input$datapath, 
                          sheet = input$file1sheet))
      } else {
        return(NULL)
      }
    })
  
      
   
  }
  
  shinyApp(ui, server)
  </code></pre>