Skip to content

Instantly share code, notes, and snippets.

@masaha03
Created December 28, 2012 09:31
Show Gist options
  • Save masaha03/4396386 to your computer and use it in GitHub Desktop.
Save masaha03/4396386 to your computer and use it in GitHub Desktop.
EXCELからSQLiteへの変換 xlsxのみ対応。読み込みたいセルの範囲に名前をつけておくのがポイント。 http://goo.gl/6R6Fo
library("XLConnect")
library("RSQLite")
table1 <- readNamedRegionFromFile("tables.xlsx", "table1")
driver <- dbDriver("SQLite")
conn <- dbConnect(driver, dbname = "foo.sqlite3")
dbWriteTable(conn, "table1", table1, row.names=FALSE)
dbDisconnect(conn)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment