Re: help

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

Re: help

Octave - General mailing list
Dear Fernando,

Please don't email developers directly but ask in
* the help-octave mailing list ([hidden email]; forwarded)
  or maybe better,
* post in the Octave Discourse help group
(https://octave.discourse.group/c/help/6)

There are many more people there that may be able to help you.

P.

Fernando Duarte wrote:

> Hi,
> I'm Fernando Duarte, one maths teacher from Portugal.
> I need, using xlswrite from octave, to write on excel (xlsx) sheet a
> string matrix with special characters like ç, õ, á,.....
> for example:
> a={'square'; 'diamond'; 'sin'}
> b={'faço'; 'ação';' sátão'}
> if I use xlswrite('myfile.xlsx', a) ->all runs well
> but if  I try
> xlswrite('myfile.xlsx',b) I have an error when I try open Excel sheet.
> Can you help me solve this problem?
> Thank you very much, in advance
>
> sincerely
>
> Fernando Baltazar M Duarte
> [hidden email] <mailto:[hidden email]>



Reply | Threaded
Open this post in threaded view
|

Re: help

mmuetzel
Am 19. Januar 2021 um 17:38 Uhr schrieb "prnienhuis--- via Help list for GNU Octave":

> Dear Fernando,
>
> Please don't email developers directly but ask in
> * the help-octave mailing list ([hidden email]; forwarded)
>   or maybe better,
> * post in the Octave Discourse help group
> (https://octave.discourse.group/c/help/6)
>
> There are many more people there that may be able to help you.
>
> P.
>
> Fernando Duarte wrote:
> > Hi,
> > I'm Fernando Duarte, one maths teacher from Portugal.
> > I need, using xlswrite from octave, to write on excel (xlsx) sheet a
> > string matrix with special characters like ç, õ, á,.....
> > for example:
> > a={'square'; 'diamond'; 'sin'}
> > b={'faço'; 'ação';' sátão'}
> > if I use xlswrite('myfile.xlsx', a) ->all runs well
> > but if  I try
> > xlswrite('myfile.xlsx',b) I have an error when I try open Excel sheet.
> > Can you help me solve this problem?
> > Thank you very much, in advance
> >
> > sincerely
> >
> > Fernando Baltazar M Duarte
> > [hidden email] <mailto:[hidden email]>

Which version of Octave are you using? Which version of the io package?
Which platform (Linux, Windows, MacOS) are you on?
Which exact error message do you get?

Markus



Reply | Threaded
Open this post in threaded view
|

Re: help

mmuetzel
Am 19. Januar 2021 um 18:26 Uhr schrieb "Fernando Duarte":

> Dear Markus,
> Thank you for your email and support.
> I have this part of code 
> xlh=xlsopen('IEA.xlsx',1,[]);
> [X,Y]=xls2oct(xlh);
> [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  

>
> Thank you very much, in advance

> sincerely
> fernando duarte

Please, keep the mailing list in CC.
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