我正在尝试从SQLite数据库sms.db
导入,它适用于Type=INTEGER like date or handle_id
但不适用于type=TEXT like text from message table
Sub GetSQLite()
Dim conn As Object, rst As Object
Set conn = CreateObject("ADODB.Connection")
Set rst = CreateObject("ADODB.Recordset")
' OPEN CONNECTION
conn.Open "DRIVER=SQLite3 ODBC Driver;Database=C:\SQLite3\sms.db;"
strSQL = "SELECT handle_id , is_from_me , ***text*** , date , date_read FROM message;"
' OPEN RECORDSET
rst.Open strSQL, conn
' OUTPUT TO WORKSHEET
Worksheets("Feuil1").Range("A1").CopyFromRecordset rst
rst.Close
' FREE RESOURCES
Set rst = Nothing: Set conn = Nothing
End Sub