import excel into R
library("openxlsx")
read.xlsx("Path_to_your_excel_file\excel_file.xlsx")
import excel into R
library("openxlsx")
read.xlsx("Path_to_your_excel_file\excel_file.xlsx")
connect excel to r
#XLConnect Package
library(XLConnect)
##Build Connection to excel
x <- loadWorkbook("data.xlsx")
##Get Sheet name
getSheets("data.xlsx")
#Read Sheet
readWorksheet("data.xlsx", sheet = 2,
startRow = 3, endRow = 5,
startCol = 2, endCol = 4,
header = FALSE)
# Add a worksheet to x
createSheet(x, "data_summary")
# Remove the fourth sheet
removeSheet(my_book, 4) # 4 is interchangeable with sheet name
# Add data in summ to "data_summary" sheet
writeWorksheet(x, data = summ, sheet = "data_summary")
# Rename "data_summary" sheet to "summary"
renameSheet(x, "data_summary", "summary")
# Save workbook as summary.xlsx
saveWorkbook(x "summary.xlsx")
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us