Re : [VBA][Firefox 3] Comment importer places.sqlite dans Excel ?
Bonjour job75
Pour le moment je reste fidèle à Excel 2000.
Je n'ai rien trouver de probant (pour moi en tout cas) sur le net
(juste un addon pour Firefox sqlite-manager) mais je préfère m'en passer pour le moment
Mais par gout du challenge , je voudrais trouver un moyen d'utiliser Excel et SQLite.
Et c'est là que j'ai besoin de vos lumière amis forumeurs.
• Actuellement je suis une autre piste:
utiliser RegExp (mais je patine) pour supprimer les caractères non alphanumériques)
Re : [VBA][Firefox 3] Comment importer places.sqlite dans Excel ?
REbonsoir à tous
N'ayant pas réussi avec RegExp
Voila le moyen actuel que j'utilise.
Si vous avez des idées pour optimiser la chose. N'hésiter pas
Et si quelqu'un peut me guider pour SQLite, il est le bienvenu.
(car le code VBA ci-dessous n'est pas très top )
Code:
Public Function gst(Chaine$) As String
Dim i As Long, t As String
For i = 1 To Len(Chaine)
t = Mid$(Chaine, i, 1)
Select Case Asc(t)
Case 32, 37, 38, 45, 46 To 58, 61, 63, 65 To 90, 92, 95, 97 To 122
gst = gst & t
End Select
Next
End Function
Code:
Sub del_chrs()
Dim C As Range
For Each C In ActiveSheet.UsedRange.SpecialCells(xlCellTypeConstants, 2)
On Error Resume Next
C.Value = gst(C.Text)
Next
End Sub
Code:
Sub rpvs()
Range("A1:A" & [A65536].End(xlUp).Row).SpecialCells(xlCellTypeBlanks).Value = "µµ"
End Sub
Sub traitement()
Application.ScreenUpdating = False
Application.EnableEvents = False
del_chrs
rpvs
nettoyage
mise_en_forme
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
Code:
Sub mise_en_forme()
Dim rc As Range
Dim f As Long
f = [A65536].End(xlUp).Row
Range("A1").EntireColumn.Insert
With Range("A2")
.FormulaR1C1 = "=MID(RC[1],SEARCH(""http://w"",RC[1]),9^9)"
.AutoFill Destination:=Range("A2:A" & f)
End With
Set rc = Range("A2:A" & f)
rc.SpecialCells(xlCellTypeFormulas, 16).EntireRow.Delete
Columns(1).Columns.AutoFit
rc.Value = rc.Value
Range("B1:IV65536").Clear
With Range("A1")
.Value = "LIENS ISSUS DE L'HISTORIQUE"
.Font.Bold = True
.BorderAround , xlThin, 15
End With
End Sub
Re : [VBA][Firefox 3] Comment importer places.sqlite dans Excel ?
Bonjour à tous
Un petit up.
En espérant que ceux qui maitrisent SQL ou SQLite liront ce fil.
EDITION: j'ai trouvé ces infos intéressantes sur le fichier places.sqlite
mais je ne sais pas comment les exploiter avec Excel et SQL Mozilla Firefox 3 History File Format
EDITION 2: j'ai téléchargé cet utilitaire (en ligne de commande) http://www.sqlite.org/sqlite-3_6_6.zip ,mais je n'arrive pas à l'exploiter
Quelqu'un saurait-il m'aider à l'utiliser, svp.
Merci.
Re : [VBA][Firefox 3] Comment importer places.sqlite dans Excel ?
Bonjour Hasco
Merci d'être passé dans ce fil
Je joins ici un exemple de fichier places.sqlite
Je cherche à utiliser la syntaxe SQL* (ou ADO*) pour importer ce fichier
dans Excel.
*Je ne maitrise aucune de ces méthodologies.
Parallèlement je m'échine depuis à utiliser sqlite3.exe (en ligne de commande) à partir de VBA.
J'en suis au balbutiements.
Toute aide (quelle que soit la méthode utilisée) est la bienvenue.
En espérant que d'autres neurones que les miens , ceux d'Hasco, de job75, et d'autres VBAistes émérites du forum, (private joke R. )
se joindront à la fête.
Re : [VBA][Firefox 3] Comment importer places.sqlite dans Excel ?
Re
Si cela peut vous aider voici les paramètres de Sqlite3.exe
sqlite> .help
.bail ON|OFF Stop after hitting an error. Default OFF
.databases List names and files of attached databases
.dump ?TABLE? ... Dump the database in an SQL text format
.echo ON|OFF Turn command echo on or off
.exit Exit this program
.explain ON|OFF Turn output mode suitable for EXPLAIN on or off.
.header(s) ON|OFF Turn display of headers on or off
.help Show this message
.import FILE TABLE Import data from FILE into TABLE
.indices TABLE Show names of all indices on TABLE
.load FILE ?ENTRY? Load an extension library
.mode MODE ?TABLE? Set output mode where MODE is one of:
csv Comma-separated values
column Left-aligned columns. (See .width)
html HTML <table> code
insert SQL insert statements for TABLE
line One value per line
list Values delimited by .separator string
tabs Tab-separated values
tcl TCL list elements
.nullvalue STRING Print STRING in place of NULL values
.output FILENAME Send output to FILENAME
.output stdout Send output to the screen
.prompt MAIN CONTINUE Replace the standard prompts
.quit Exit this program
.read FILENAME Execute SQL in FILENAME
.schema ?TABLE? Show the CREATE statements
.separator STRING Change separator used by output mode and .import
.show Show the current values for various settings
.tables ?PATTERN? List names of tables matching a LIKE pattern
.timeout MS Try opening locked tables for MS milliseconds
.width NUM NUM ... Set column widths for "column" mode
sqlite>