[scilab-Users] export data to Excel from Scilab

Gianluca Antonelli antonelli at unicas.it
Fri Nov 12 08:53:29 CET 2010


Dear Paul,

the issue of writing on an xls file is actually important when the file 
is existing.

In my case, it is necessary first to read the values of some cells, 
perform some operations using the scilab tools and then write in some 
cells the results.

This can not be done via cvs-like files both because the file is 
existing and/or because it contains some graphics.

As far as I know in Scilab it is not possible to write an xls file, am I 
wrong?

Best,
Gianluca

paul.carrico at free.fr wrote:
> Hi,
> 
> My personal method is to export data in cvs file ... just an example herebellow (copy & paste)
> 
> Paul
> 
>   // STEP 7 : Sauvegarde des résultats dans un fichier cvs
>   printf("\n");
>   printf("############################################################################\n")
>   printf("      STEP 7 : sauvegarde des r%csultats dans un fichier .cvs                 \n",ascii(233))
>   printf("############################################################################\n")
>   printf("\n");
>   RESU2 = mopen(CHEMIN_DATA + "/epsilon_sigma_" + string(nom_mat) + ".csv",'w') ;
>   mfprintf(RESU2,'Module d''YOUNG E = ; %g ; [MPa]\n',parameters_opti(1));
>   mfprintf(RESU2,'Limite %clastique RP0.2 = ; %g ; [MPa]\n',ascii(233),Rp02(1,2));
>   mfprintf(RESU2,'Limite %c striction Rm = ; %g ; [MPa]\n',ascii(224), Rm);
>   mfprintf(RESU2,'Allongement A%c = ; %g ; [%c]\n',ascii(37),A_pourcent,ascii(37));
>   mfprintf(RESU2,'\n\n');
>   if ( ((type_fichier_resultat == 1) | (type_fichier_resultat ==2)) | ((type_fichier_resultat == 3) | (type_fichier_resultat == 5))) then
> 	mfprintf(RESU2,'Donn%ces essais :\n',ascii(233));
> 	mfprintf(RESU2,'Section initiale S0 : %g\n',section_initiale_S0)
> 	mfprintf(RESU2,'Longueur initiale extensom%ctre : %g\n',ascii(232),longueur_extenso_Le)
>   end
> 
>   if (choix_deformations == 1) then
> 	  mfprintf(RESU2,'EPSILON [-] ; SIGMA RATIONNELLE [MPa]\n');
>   elseif (choix_deformations == 2) then
> 	  mfprintf(RESU2,'EPSILON [-] ; SIGMA CONVENTIONNELLE [MPa]\n');
>   end
> 
> 
>   for i = 1 : nbre_lignes_donnees2
>       mfprintf(RESU2,'%g ; %g\n',TRACTION(i,1),TRACTION(i,2)) ;
>   end;
>       
>   // fermeture du fichier résultat  
>   mclose(RESU2);
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ----- Mail Original -----
> De: "JULIEN Frédéric" <castaneasativa at free.fr>
> À: users at lists.scilab.org
> Envoyé: Jeudi 11 Novembre 2010 19h20:56 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne
> Objet: [scilab-Users] export data to Excel from Scilab
> 
> 
> Hello, 
> 
> I'm a begginer on Scilab. 
> I try to make a program with Scilab. This program must to do: 
> 1) to import data from Excel files. 
> 2) to process data with Scilab program. 
> 3) to export data to Excel files. 
> 
> No problem for the first and the second stage, but I don't know how to solve the third stage (all of my data are in the first Excel cell ). 
> 
> Somebody could help me please ? 
> 
> thanks, 
> 
> Fred 
> 




More information about the users mailing list