umx_make_sql_from_excel: Convert an excel spreadsheet in a text file on sql...

umx_make_sql_from_excelR Documentation

Convert an excel spreadsheet in a text file on sql statements.

Description

Unlikely to be of use to anyone but the package author :-)

Usage

umx_make_sql_from_excel(theFile = "Finder")

Arguments

theFile

The xlsx file to read. Default = "Finder")

Details

On OS X, by default, the file selected in the front-most Finder window will be chosen. If it is blank, a choose file dialog will be thrown.

Read an xlsx file and convert into SQL insert statements (placed on the clipboard) On MacOS, the function can access the current front-most Finder window.

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

tabbedPlus: list scored from 0 to n-1

tabbedVertPlus: tabbed, but vertical lay-out

number 2+2\<itemBreak\>min='0' max='7' step='1'

5fm Scored 1-5, anchored: Strongly Disagree | Disagree | Neutral | Agree | Strongly Agree

intro (not) scored, and sequenced as item 0

Value

None

References

See Also

Other File Functions: dl_from_dropbox(), umx_file_load_pseudo(), umx_move_file(), umx_open(), umx_rename_file(), umx_write_to_clipboard(), umx

Examples

## Not run: 
# An example Excel spreadsheet
# local uncompiled path
fp = system.file("inst/extdata", "GQ6.sql.xlsx", package = "umx")
# installed path
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

## End(Not run)

tbates/umx documentation built on March 16, 2024, 4:26 a.m.