diff --git a/DESCRIPTION b/DESCRIPTION index 80a1738..0ba1ef6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,10 @@ Package: excelR Type: Package Title: A Wrapper of the 'JavaScript' Library 'jExcel' -Version: 0.1.0 -Author: Swechhya Bista +Version: 0.2.0 +Authors@R: c(person("Swechhya", "Bista", email = "swechhyabista@gmail.com", + role = c("aut", "cre")), + person("Kent", "Russell", role = c("ctb"))) Maintainer: Swechhya Bista Description: An R interface to 'jExcel' library to create web-based interactive tables and spreadsheets compatible with 'Excel' or any other spreadsheet software. License: MIT + file LICENSE diff --git a/NEWS.md b/NEWS.md index 20aacd6..90f80e4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -10,6 +10,8 @@ * begin to add tests +* add communication with shiny + # excelR 0.1.0 diff --git a/README.md b/README.md index c314b12..6619469 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # excelR -[![version](http://www.r-pkg.org/badges/version/excelR)](https://CRAN.R-project.org/package=excelR) -[![CRAN_Download_Badge](http://cranlogs.r-pkg.org/badges/grand-total/excelR)](http://cran.r-project.org/package=excelR) +[![version](https://www.r-pkg.org/badges/version/excelR)](https://CRAN.R-project.org/package=excelR) +[![CRAN_Download_Badge](https://cranlogs.r-pkg.org/badges/grand-total/excelR)](https://cran.r-project.org/package=excelR) [![Travis-CI Build Status](https://travis-ci.org/Swechhya/excelR.svg?branch=master)](https://travis-ci.org/Swechhya/excelR) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/Swechhya/excelR?branch=master&svg=true)](https://ci.appveyor.com/project/Swechhya/excelR) [![codecov](https://codecov.io/gh/Swechhya/excelR/branch/master/graph/badge.svg)](https://codecov.io/gh/Swechhya/excelR) @@ -61,6 +61,7 @@ This package can be used in `shiny` - Pagination - Lazy loading - Native color picker -- Great data picker: dropdown, autocomplete, multiple, group options and icons +- Data picker dropdown with autocomplete, multiple, and icons feature +- Date picker diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 71e38f0..51e8718 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -60,7 +60,7 @@ excelR - 0.1.0 + 0.2.0 diff --git a/docs/authors.html b/docs/authors.html index d2c61cf..3c8502a 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -60,7 +60,7 @@ excelR - 0.1.0 + 0.2.0 @@ -104,7 +104,11 @@

Authors

diff --git a/docs/index.html b/docs/index.html index 971d181..7e925cb 100644 --- a/docs/index.html +++ b/docs/index.html @@ -30,7 +30,7 @@ excelR - 0.1.0 + 0.2.0 @@ -291,6 +291,7 @@

Style

+

Styling in version 0.1.0:

 library(excelR)
 
  data = data.frame( Make = c('Honda', 'Honda', 'Hyundai'),
@@ -302,21 +303,54 @@ 

B1=c('background-color:orange', 'color:green')) excelTable(data=data, columns = columns, style = style)

+

Styling from version 0.2.0 onwards:

+
 library(excelR)
+
+ data = data.frame( Make = c('Honda', 'Honda', 'Hyundai'),
+                   Car = c('Civic', 'City', 'Creta'))
+
+ columns = data.frame(title=c('Make', 'Car'), width= c(300, 300))
+  
+ style = list(A1='background-color:orange; color:green;', 
+              B1='background-color:orange; color:green;')
+                      
+ excelTable(data=data, columns = columns, style = style)

Shiny Integration

-
  library(shiny)
-  library(excelR)
-
-   shinyApp(
-     ui = fluidPage(excelOutput("table")),
-     server = function(input, output, session) {
-       output$table <-
-      renderExcel(excelTable(data = head(iris)))
-      }
-    )
+
+

+Creating excel table in Shiny

+
  library(shiny)
+  library(excelR)
+
+   shinyApp(
+     ui = fluidPage(excelOutput("table")),
+     server = function(input, output, session) {
+       output$table <-
+      renderExcel(excelTable(data = head(iris)))
+      }
+    )
+
+
+

+Reading changed data from excel table in Shiny

+
  library(shiny)
+  library(excelR)
+
+   shinyApp(
+     ui = fluidPage(excelOutput("table")),
+     server = function(input, output, session) {
+       output$table <-
+      renderExcel(excelTable(data = head(iris)))
+      observeEvent(input$table,{
+        print(excel_to_R(input$table))
+      })
+      }
+    )
+
@@ -345,7 +379,8 @@

License

Developers

diff --git a/docs/news/index.html b/docs/news/index.html index 83ef844..fe3f639 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -60,7 +60,7 @@ excelR - 0.1.0 + 0.2.0 @@ -113,6 +113,7 @@

  • change style argument to a named list of character CSS styles

  • add examples

  • begin to add tests

  • +
  • add communication with shiny

  • diff --git a/docs/reference/excelOutput.html b/docs/reference/excelOutput.html index b1546d8..3989b60 100644 --- a/docs/reference/excelOutput.html +++ b/docs/reference/excelOutput.html @@ -63,7 +63,7 @@ excelR - 0.1.0 + 0.2.0
    diff --git a/docs/reference/excelTable.html b/docs/reference/excelTable.html index 8950e5c..3448393 100644 --- a/docs/reference/excelTable.html +++ b/docs/reference/excelTable.html @@ -63,7 +63,7 @@ excelR - 0.1.0 + 0.2.0 diff --git a/docs/reference/excel_to_R.html b/docs/reference/excel_to_R.html new file mode 100644 index 0000000..71e5bd7 --- /dev/null +++ b/docs/reference/excel_to_R.html @@ -0,0 +1,170 @@ + + + + + + + + +Convert excel object to data.frame — excel_to_R • excelR + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + +
    + +

    This function is used to excel data to data.frame. Can be used in shiny app to convert input json to data.frame

    + +
    + +
    excel_to_R(excelObj)
    + +

    Arguments

    + + + + + + +
    excelObj

    the json data retuned from excel table

    + + +

    Examples

    +
    if(interactive()){ + library(shiny) + library(excelR) + shinyApp( + ui = fluidPage(excelOutput("table")), + server = function(input, output, session) { + output$table <- + renderExcel(excelTable(data = head(iris))) + observeEvent(input$table,{ + print(excel_to_R(input$table)) + }) + } + ) +}
    +
    + +
    + +
    + + +
    +

    Site built with pkgdown 1.3.0.

    +
    +
    +
    + + + + + + diff --git a/docs/reference/index.html b/docs/reference/index.html index 9e34169..91acdeb 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -60,7 +60,7 @@ excelR - 0.1.0 + 0.2.0 @@ -131,6 +131,12 @@

    excel_to_R()

    + +

    Convert excel object to data.frame

    + +

    renderExcel()

    diff --git a/docs/reference/renderExcel.html b/docs/reference/renderExcel.html index f40143b..5920b3e 100644 --- a/docs/reference/renderExcel.html +++ b/docs/reference/renderExcel.html @@ -63,7 +63,7 @@ excelR - 0.1.0 + 0.2.0 diff --git a/index.Rmd b/index.Rmd index ebbf8be..fb420b3 100644 --- a/index.Rmd +++ b/index.Rmd @@ -238,6 +238,8 @@ library(excelR) ![](inst/images/formula.gif) #### Style {#style} + +Styling in version `0.1.0`: ```r library(excelR) @@ -251,9 +253,41 @@ library(excelR) excelTable(data=data, columns = columns, style = style) ``` + +Styling from version `0.2.0` onwards: +```r + library(excelR) + + data = data.frame( Make = c('Honda', 'Honda', 'Hyundai'), + Car = c('Civic', 'City', 'Creta')) + + columns = data.frame(title=c('Make', 'Car'), width= c(300, 300)) + + style = list(A1='background-color:orange; color:green;', + B1='background-color:orange; color:green;') + + excelTable(data=data, columns = columns, style = style) +``` + ![](inst/images/style.png) ### Shiny Integration {#shiny-integration} + +#### Creating excel table in Shiny +```r + library(shiny) + library(excelR) + + shinyApp( + ui = fluidPage(excelOutput("table")), + server = function(input, output, session) { + output$table <- + renderExcel(excelTable(data = head(iris))) + } + ) + +``` +#### Reading changed data from excel table in Shiny ```r library(shiny) library(excelR) @@ -263,6 +297,9 @@ library(excelR) server = function(input, output, session) { output$table <- renderExcel(excelTable(data = head(iris))) + observeEvent(input$table,{ + print(excel_to_R(input$table)) + }) } )