Aller au contenu

création fichier sur serveur distant


Chlock

Recommended Posts

Posté(e)

Bonjour, au lieu de créer un fichier sur ma sdcard de mon emulateur android comme je fais ci dessous:

public WritableWorkbook createWorkbook(String fileName){
    //exports must use a temp file while writing to avoid memory hogging
    WorkbookSettings wbSettings = new WorkbookSettings(); 				
    wbSettings.setUseTemporaryFileDuringWrite(true);   
 
    //get the sdcard's directory
    File sdCard = Environment.getExternalStorageDirectory();
    //add on the your app's path
    File dir = new File(sdCard.getAbsolutePath() + "/JExcelApiTest");
    //make them in case they're not there
    dir.mkdirs();
    //create a standard java.io.File object for the Workbook to use
    File wbfile = new File(dir,fileName);
 
    WritableWorkbook wb = null;
 
    try{
	//create a new WritableWorkbook using the java.io.File and
	//WorkbookSettings from above
	wb = Workbook.createWorkbook(wbfile,wbSettings); 
    }catch(IOException ex){
	Log.e(TAG,ex.getStackTrace().toString());
	Log.e(TAG, ex.getMessage());
    }
 
    return wb;	
}

je voudrais le creer et sur mon pc ou repertoire serveur du genre:

wb = Workbook.createWorkbook(new File("F:\\exemple2.xls"));

Une idée les amis

 

merci à tous

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

×
×
  • Créer...