Help for Export to Excel in octave

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

Help for Export to Excel in octave

Hamed Khatibi
Hi
Please help me to convert these lines so the octave can debug them:

writecell({'R'},'Output.xlsx','sheet',1,'Range','A1');
writematrix(R,'Output.xlsx','sheet',1,'Range','A2');

writecell({'C'},'Output.xlsx','sheet',2,'Range','A1');
writematrix(C,'Output.xlsx','sheet',2,'Range','A2');

writecell({'LQ'},'Output.xlsx','sheet',3,'Range','A1');
writematrix(LQ,'Output.xlsx','sheet',3,'Range','A2');

writecell({'Region/Section per region'},'Output.xlsx','sheet',4,'Range','A1');
writematrix(o_vector,'Output.xlsx','sheet',4,'Range','A2');

I think writecell and writematrix is not defined in octave and work only in matlab.
Thanks


Reply | Threaded
Open this post in threaded view
|

Re: Help for Export to Excel in octave

nrjank
Administrator
On Sat, Apr 4, 2020 at 2:30 PM Hamed Khatibi <[hidden email]> wrote:
Hi
Please help me to convert these lines so the octave can debug them:

writecell({'R'},'Output.xlsx','sheet',1,'Range','A1');
writematrix(R,'Output.xlsx','sheet',1,'Range','A2');


I believe the xlswrite function should be able to accomplish what you want:


Reply | Threaded
Open this post in threaded view
|

Re: Help for Export to Excel in octave

Andreas Weber-6
In reply to this post by Hamed Khatibi
Am 04.04.20 um 20:30 schrieb Hamed Khatibi:
> ...
> writecell({'R'},'Output.xlsx','sheet',1,'Range','A1');
> writematrix(R,'Output.xlsx','sheet',1,'Range','A2');

You can use the octave-forge io package:
https://octave.sourceforge.io/io/overview.html

the OCT interface should be sufficient.
x = xlsread ('file.xlsx', 1, [], 'OCT');
x = oct2xls (...., x, "sheet");
...
xlsclose (x)

-- Andy


Reply | Threaded
Open this post in threaded view
|

Re: Help for Export to Excel in octave

nrjank
Administrator
In reply to this post by nrjank



On Saturday, April 4, 2020, 10:32:29 PM GMT+3, Nicholas Jankowski <[hidden email]> wrote:


On Sat, Apr 4, 2020 at 2:30 PM Hamed Khatibi <[hidden email]> wrote:
Hi
Please help me to convert these lines so the octave can debug them:

writecell({'R'},'Output.xlsx','sheet',1,'Range','A1');
writematrix(R,'Output.xlsx','sheet',1,'Range','A2');



I believe the xlswrite function should be able to accomplish what you want:
On Sun, Apr 5, 2020 at 12:09 PM Emil M. Oanta <[hidden email]> wrote:
I use csvwrite

I also developed customized functions to read from csv.


(Please Reply All so the whole list gets the message, do not just reply to one person.  Also put your reply at the end of the message, and trim any unnecessary lines.)

So, do you need any more help or did you figure out how to do everything you need?