help about IO package Octave

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

help about IO package Octave

Octave - General mailing list
I have this part of code 
a=xlsopen('IEA.xlsx',1,[]);
[X,Y]=xls2oct(a);
[A1,A2,lim]= parsecell (X);

 and I want to write  A2(1,1:25), A2(2:end,5)..... into a excel xlsx file using oct2xls() .


 the A(1,1:25) have special  portuguese characters like  ã ç,.....

version of Octave 6.1.0.  version of the io package: 2.6.3
 plataform: windows 10    

Can someone help me with this?
sincerely
FDuarte

Com os melhores cumprimentos,

IP Luso

Fernando Baltazar Duarte
Presidente
 
Instituto Politécnico da Lusofonia
Campo Grande, 400
1700-098 Lisboa
Telf. 218621060/217548625
Email: [hidden email]
www.ipluso.pt



Reply | Threaded
Open this post in threaded view
|

Re: help about IO package Octave

mmuetzel
Am 20. Januar 2021 um 13:41 Uhr schrieb "Fernando Duarte via Help-octave":

> I have this part of code 
> a=xlsopen('IEA.xlsx',1,[]);
> [X,Y]=xls2oct(a);
> [A1,A2,lim]= parsecell (X);
>
>  and I want to write  A2(1,1:25), A2(2:end,5)..... into a excel xlsx file using oct2xls() .

>  the A(1,1:25) have special  portuguese characters like  ã ç,.....
>
> version of Octave 6.1.0.  version of the io package: 2.6.3
>  plataform: windows 10    

> Can someone help me with this?
> sincerely
> FDuarte

Did you try what I suggested in the other thread you started?
Did you run into issues using that approach?

https://lists.gnu.org/archive/html/help-octave/2021-01/msg00026.html 
> There is currently a bug (in the io package or in Octave - not sure yet) that leads to errors when reading/writing non-ASCII characters from/to Excel files.
> It is possible to work around that bug by setting the default file encoding to UTF-8.
> You can either do that in the preferences ("Editor" tab -> Set "Text encoding used for loading and saving" to "UTF-8") or with the following command:
> __mfile_encoding__ ("utf-8")
>
> You might have to convert your .m files to UTF-8 if they contain non-ASCII characters after that. But the default will most likely change to UTF-8 for Octave 7 anyway.
>
> HTH,
> Markus





Reply | Threaded
Open this post in threaded view
|

Re: help about IO package Octave

mmuetzel
Am 20. Januar 2021 um 16:46 Uhr schrieb "Fernando Duarte":
> Thank you.
> yes, tried the sugestions and the problem with non ASCII charactrs was solved.
> But how use xls2oct  for save thee file like a excel file?

Again: Keep the mailing list in CC.

In the other message you wrote that you tried xlswrite('myfile.xlsx',b).
Does that not work with the cell array you are using now?

Markus



Reply | Threaded
Open this post in threaded view
|

Re: help about IO package Octave

mmuetzel
Am 20. Januar 2021 um 17:20 Uhr schrieb "Fernando Duarte":
> Yes xlswrite work well!
> But I would like to know how to use  oct2xls  since when I use oct2xls(b,'myfile.xlsx')  it gives an error

Keep the mailing list in CC!!!