Déposer un csv

Forum destiné aux questions sur le développement : Formules, LotusScript, Java ...

Déposer un csv

Messagepar afournery » 05 Mai 2010 à 15:15

Bonjour,

sur une action LS je souhaite laisser le choix à l'utilisateur l'emplacement d'un fichier que je vais créer ?

comment faire ?

merci d'avance
Dernière édition par afournery le 05 Mai 2010 à 15:33, édité 1 fois.
cdt,
Arnaud FOURNERY
http://afournery.free.fr
Avatar de l’utilisateur
afournery
Maître-posteur
Maître-posteur
 
Message(s) : 474
Inscrit(e) le : 24 Juin 2005 à 08:20
Localisation : Annesse et Beaulieu (24)

Messagepar Michael DELIQUE » 05 Mai 2010 à 15:16

salut

tu veux un sélecteur de répertoire ?
Cordialement

Michael (SMS-Phobique)
----------------------------
"La théorie, c'est quand on sait tout et que rien ne fonctionne. La pratique, c'est quand tout fonctionne et que personne ne sait pourquoi."
Albert EINSTEIN
Avatar de l’utilisateur
Michael DELIQUE
Administrateur
Administrateur
 
Message(s) : 12183
Inscrit(e) le : 16 Déc 2004 à 10:36
Localisation : Paris/Cergy

Messagepar afournery » 05 Mai 2010 à 15:19

oui

NotesUIWorkSpace.openFileDialog ne fonction que si le fichier existe
cdt,
Arnaud FOURNERY
http://afournery.free.fr
Avatar de l’utilisateur
afournery
Maître-posteur
Maître-posteur
 
Message(s) : 474
Inscrit(e) le : 24 Juin 2005 à 08:20
Localisation : Annesse et Beaulieu (24)

Messagepar Michael DELIQUE » 05 Mai 2010 à 15:43

le même version API

Code : Tout sélectionner
Public Function GetDirectory_API(wnbRepertoire As Long) As String
   'Cette Fonction permet de faire la sélection d'un répertoire
   
%REM
'variable API pour la fonction GetDirectory_API
'Type BROWSERINFO
'   nbOwner As Long
'   nbRoot As Long
'   nbDisplayName As String
'   BITitle As String
'   nbFlag As Long
'   nblpfn As Long
'   nbParam As Long
'   nbImage As Long
'End Type

'Declare Function GetActiveWindow Lib "user32.dll" () As Long
'Declare Function BrowseFolderDlg Lib "shell32.dll" Alias "SHBrowseForFolder" (lpBrowseInfo As BROWSERINFO) As Long
'Declare Function GetPathFromIDList Lib "shell32.dll" Alias "SHGetPathFromIDList" (Byval nbPointer As Long, Byval PathBuffer As String) As Long
%END REM
   
   'Déclaration des Variables   
   Dim InfoNavigation As BROWSERINFO
   Dim nbPointer As Long
   Dim nbResult As Long
   Dim PathBuffer As String
   Dim PathRepertoire As String
   
   On Error Goto ErreurGetDirectory_API
   
   InfoNavigation.nbOwner = GetActiveWindow()
   
   ' Répertoire par défaut
   Select Case wnbRepertoire
   Case 0 'Poste de Travail
      InfoNavigation.nbRoot = 0
   Case 5 'Mes Documents
      InfoNavigation.nbRoot = 5
   Case Else
      InfoNavigation.nbRoot = 0
   End Select
   
   InfoNavigation.BITitle = "Sélectionnez le répertoire : "
   InfoNavigation.nbDisplayName = String(255, Chr(0))
   InfoNavigation.nbFlag = 1
   
   nbPointer = BrowseFolderDlg(InfoNavigation)
   
   If nbPointer <> 0 Then
      PathBuffer = String(255, Chr(0))
      nbResult = GetPathFromIDList(Byval nbPointer, Byval PathBuffer)
      PathRepertoire = Left(PathBuffer, Instr(PathBuffer, Chr(0)) - 1)
   End If
   
   GetDirectory_API = PathRepertoire
   
   Exit Function
ErreurGetDirectory_API:
   Msgbox "("+Cstr(Getthreadinfo (1))+" Call by "+Cstr(Getthreadinfo(10))+")"+Chr(10)+"Erreur " + Str(Err) + " : "+Chr(10) + Cstr(Error)+". "+Chr(10)+"Ligne N° "+Cstr(Erl),16," ERREUR !"
   GetDirectory_API = ""
   Exit Function
End Function
Cordialement

Michael (SMS-Phobique)
----------------------------
"La théorie, c'est quand on sait tout et que rien ne fonctionne. La pratique, c'est quand tout fonctionne et que personne ne sait pourquoi."
Albert EINSTEIN
Avatar de l’utilisateur
Michael DELIQUE
Administrateur
Administrateur
 
Message(s) : 12183
Inscrit(e) le : 16 Déc 2004 à 10:36
Localisation : Paris/Cergy


Retour vers Développement

cron