Option Explicit

Dim objExcel
Dim objSheet
Dim fileName

fileName = Array("test.xlsx","test2.xlsx")
'エクセルオブジェクトを作成します
Set objExcel = CreateObject("Excel.Application")

'ワークブックを開きます
'filePath = "C:\Users\oomori\Desktop\" & fileName(0)
objExcel.Workbooks.Open "C:\Users\oomori\Desktop\" & fileName(0),,,,"1234",,"true"

'①エクセル画面を表示し、2秒待機します
objExcel.Visible = True

Set objSheet = objExcel.Sheets(2)
objSheet.Range("A10").Value = "AAAAbbbbcccc"

objExcel.Workbooks(1).Close(true)
'エクセルを終了します
objExcel.Quit

'エクセルオブジェクトの破棄
Set objExcel = Nothing

Java:JSONIC

Android:org.json.JSONObject


【Java】

単純にDBから読み込んだ値をJSONに変換する


List<Items> listItems = jdbcManager.from(Items.class).orderBy("id").getResultList();
String text = JSON.encode(listItems); ←これでEntityからJSON形式に変換してくれる。
ResponseUtil.write(text);


【Android】

Javaからの戻り値をJSON形式で読み込む


String json = UtilHttp.getHttpStr("http://192.168.1.22:8080/sastruts/hello ");
textView.setText(json);
JSONArray jsons = new JSONArray(json); ←これでJSON形式に変換してくれる。
for (int i = 0; i < jsons.length(); i++) {
JSONObject jsonObj = jsons.getJSONObject(i);
int id = jsonObj.getInt("id");
String text = jsonObj.getString("name");
Log.v("------:",text);
Log.v("------:",Integer.toString(id));
}



★以下の場所にsqliteのデータファイルが置かれている場合

C:\sqlite\sample.sqlite3


★jdbcドライバ

sqlitejdbc-v056.jarをクラスパスに置く

EclipseだとWEB-INFのlibにコピーすればOK


★jdbc.diconの設定

<component name="xaDataSource"
class="org.seasar.extension.dbcp.impl.XADataSourceImpl">
<property name="driverClassName">
"org.sqlite.JDBC"

</property>
<property name="URL">
"jdbc:sqlite:C:/sqlite/sample.sqlite3"
</property>
<property name="user">""</property>
<property name="password">""</property>
</component>


とりあえずこれで接続可能になった。


★GUIツール

・sqlitestudio

・Navicat Lite

その他、FireFoxプラグイン(SQLite Manager)Eclipseプラグイン(DBViewer)などがある。