1
のJava 1.7は、Apache POI--3.8、JDBCApache-poiブックオブジェクトをOracle BLOB列に格納する/取り出しする方法
要件: 1)サーバーの任意のファイル作成.without DBから来ている完全なデータを持つワークブックオブジェクトを()を作成します。エラーを取得取得中
byte[] byteArray = wb.getBytes();
InputStream is = new ByteArrayInputStream(byteArray);
ps.setBinaryStream(1, is, 1000000); // Here i am having some confusion
ps.execute // Successfully stored in blob column.
:
HSSFWorkbook wb = new HSSFWorkbook(); // this object I want to store in DB blob column, without any file creation at server.
insertDataToCells(wb, "output", data); // this method will insert data in cells of workbook.
**//TODO code to store wb in blob column.** // How to store ?
2)
// TODO How to retrive
するアプローチに続いてブロブからのデータ(ワークブック)を取得し、Excelにこれを変換し、メールの添付ファイルに送りますファイルが壊れた。
true :)私は長さ1000000を与えていました。そのため、ファイルが壊れていたためです。 – user3676578