Importing files into sql using java -


i need way import text, excel or .csv file microsoft sql database new table. normally, ssis packages in directly importing these files database.

is there equivalent tool java automatically reads file , creates table (and defines data structures)?


suppose have big excel worksheet, , want store table in database. there automated method reads worksheet me , automatically generates database table appropriate data types?

you need use apache poi read excel file, , create table jdbc statements, determine excel cell datatype can use:

hssfcell cell = (hssfcell) cells.next(); int type = cell.getcelltype(); 

and build sql create statement using determined datatypes. 1 important things formatting of excel sheets, each column should have same datatype of course.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

python 3.5 - Pyqtgraph string in x tick -