Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gdemin/excel.link
Convenient Data Exchange between R and Microsoft Excel
https://github.com/gdemin/excel.link
excel ms-excel msexcel r transfer-data
Last synced: 4 days ago
JSON representation
Convenient Data Exchange between R and Microsoft Excel
- Host: GitHub
- URL: https://github.com/gdemin/excel.link
- Owner: gdemin
- Created: 2014-07-11T20:26:49.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-09-17T20:01:38.000Z (5 months ago)
- Last Synced: 2025-02-09T16:07:12.457Z (11 days ago)
- Topics: excel, ms-excel, msexcel, r, transfer-data
- Language: R
- Homepage:
- Size: 2.11 MB
- Stars: 56
- Watchers: 11
- Forks: 16
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS
Awesome Lists containing this project
- jimsghstars - gdemin/excel.link - Convenient Data Exchange between R and Microsoft Excel (R)
README
# ⚠️ Looking for a new maintainer ⚠️
# I live under Linuxmint since 2018 and don't use Excel for a long time. I no longer have the possibility to maintain this package and would love for someone to take it over and continue development.excel.link
==========[](https://cran.r-project.org/package=excel.link)
[](http://cran.rstudio.com/web/packages/excel.link/index.html)❗ Microsoft Windows and Microsoft Excel are required for this package.
### Convenient Data Exchange with Microsoft Excel
Allows access to data in running instance of Microsoft Excel (e. g. `xl[a1] =
xl[b2]*3` and so on). Graphics can be transferred with `xl[a1] =
current.graphics()`. so on). Graphics can be transferred with 'xl[a1] =
current.graphics()'. Additionally there are function for reading/writing 'Excel'
files - 'xl.read.file'/'xl.save.file'. They are not fast but able to read/write
'*.xlsb'-files and password-protected files. There is an Excel workbook with
examples of calling R from Excel in the 'doc' folder. It tries to keep things as
simple as possible - there are no needs in any additional installations besides
R, only 'VBA' code in the Excel workbook. Microsoft Excel is required for this
package.The excel.link package mainly consists of two rather independent parts: one
is for transferring data/graphics to running instance of Excel, another part - work with data table in Excel in similar way as with usual data.frame.##### Transferring data
Package provided family of objects: `xl`, `xlc`, `xlr` and `xlrc`. You don't need to initialize these objects or to do any other preliminary actions. Just after execution `library(excel.link)` you can transfer data to Excel active sheet by simple assignment, for example: `xlrc[a1] = iris`. In this notation 'iris' dataset will be written with column and row names. If you doesn't need column/row names just remove 'r'/'c' letters (`xlc[a1] = iris` - with column names but without row names). To read Excel data just type something like this: `xl[a1:b5]`. You will get data.frame with values from range a1:a5 without column and row names. It is possible to use named ranges (e. g. `xl[MyNamedRange]`). To transfer graphics use `xl[a1] = current.graphics()`.
##### Live connectionFor example we put iris datasset to Excel sheet:
`xlc[a1] = iris`. After that we connect Excel range with R object: `xl_iris = xl.connect.table("a1",row.names = FALSE, col.names = TRUE)`.
So we can:
- get data from this Excel range: `xl_iris$Species`
- add new data to this Excel range: `xl_iris$new_column = 42`
- sort this range: `sort(xl_iris,column = "Sepal.Length")`
- and more...# Aknowledgements
To comply CRAN policy includes source code from RDCOMClient package (http://www.omegahat.net/RDCOMClient) by Duncan Temple Lang (duncan at wald.ucdavis.edu).