| export_xls | R Documentation |
This function uses import_xls to read the Excel workbooks into
R, then exports the components returned by import_xls to
tables in the SEUG LTVMP database.
export_xls( my_xls, my_db, data_table, sampling_event_table, import_table, verbose = TRUE, view = TRUE )
my_xls |
A character string of the complete file path of the *.xls file. |
my_db |
A connected database from |
data_table |
A character string of the name of the frequency and cover data table. |
sampling_event_table |
A character string of the name of the sampling event table. |
import_table |
A character string of the name of the import log. |
verbose |
Optional. Prints messages to the console showing function progress. Default is TRUE. If FALSE, messages are suppressed. |
view |
Optional. Prints data to console before writing them to the database. Default is TRUE. If FALSE, data are not printed and there is no prompt before writing data to the database. |
This function uses import_xls to import LTVMP data
into R and then export it to a connected Microsoft Access database.
Data is written to database tables. Objects are not returned.
import_xls, RODBC,
sqlSave, odbcConnectAccess2007
## Not run:
library("dataprocessR")
# Connect to DB
my_db <- RODBC::odbcConnectAccess2007("C:/path/to/database.accdb")
# List files
my_dir <- "C:/path/to/data"
file_list <- list.files(my_dir, pattern = ".xls", full.names = TRUE,
recursive = FALSE)
# Process file and save to database
export_xls(my_xls = file_list[1], my_db = my_db,
data_table = "tblData_FreqCov",
sampling_event_table = "tblSamplingEvent",
import_table = "tblImportRecord")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.