Bonjour,
Je tourne en rond avec l'ouverture de fichier CSV, j'ai lu quelques liens sur Developpez, mais sans succès!
Le fichier s'ouvre bien, mais en mode, je ne fais pas les séparation ";" , donc j'ai tout sur une ligne!
Le fichier CSV commence à la 5ème ligne avec: 1234.1234;POPOAUL;Olivia;01.01.1980;2;1;0;9;;;;0;0;;;;;;Clos des Clos 24;;;F-12345;FRA;0;Saint-Ginsgins;1;04;21;01.01.2017;31.07.2017;210;0;16.40;0; 53787;; 0; 0; 8817; 0; 8817;4;A0N
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 ''************OUVERTURE dialogTitle = "Navigate to and select required file." Set fileDialog = Application.fileDialog(msoFileDialogFilePicker) With fileDialog .InitialFileName = "P:\Macro_IS_Formalix" '.InitialFileName = ThisWorkbook.Path & "\" 'Alternative to previous line .AllowMultiSelect = False .Filters.Clear .Title = dialogTitle strPathFile = .SelectedItems(1) If .Show = False Then MsgBox "File not selected to import. Process Terminated" Exit Sub End If End With '************FIN OUVERTURE captureNomSAPE = Left(Dir(strPathFile), 3) Set wbSource = Workbooks.Open(Filename:=strPathFile) ' End With
Là je commence à faire n'importe quoi, je commence à mélanger des trucs, bref, c'est la galère :-(
Merci à jour par avance.
Partager