umx (version 1.9.1)

umx_make_sql_from_excel: umx_make_sql_from_excel

Description

Unlikely to be of use to anyone but the package author :-) Read an xlsx file and convert into SQL insert statements (placed on the clipboard) On OS X, the function can access the current front-most Finder window.

Usage

umx_make_sql_from_excel(theFile = "Finder")

Arguments

theFile

The xlsx file to read. If set to "Finder" (and you are on OS X) it will use the current front-most Finder window. If it is blank, a choose file dialog will be thrown.

Value

-

Details

The file name should be the name of the test. Columns should be headed: itemText direction scale type [optional response options]

The SQL fields generated are: itemID, test, native_item_number, item_text, direction, scale, format, author

References

- http://www.github.com/tbates/umx

See Also

Other File Functions: dl_from_dropbox, umx_move_file, umx_open, umx_rename_file, umx

Examples

Run this code
# NOT RUN {
# An example xcel spreadsheet
fp = system.file("inst/extdata", "GQ6.sql.xlsx", package = "umx")
fp = system.file("extdata", "GQ6.sql.xlsx", package = "umx")
umx_open(fp)
umx_make_sql_from_excel() # Using file selected in front-most Finder window
umx_make_sql_from_excel("~/Desktop/test.xlsx") # provide a path
# }

Run the code above in your browser using DataLab