[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xlswrite : create xls with several worksheet
From: |
PhilipNienhuis |
Subject: |
Re: xlswrite : create xls with several worksheet |
Date: |
Thu, 21 Apr 2016 13:26:01 -0700 (PDT) |
Littleboy wrote
> Hi,
>
> I am trying to create a report with my data from octave.
> To do this I use xlswrite, but if someone can advice to try a other way me
> he is welcome.
>
> Here is what I do :
>
> pkg load io
> pkg load windows
>
> Directory = [pwd '\Report\'];
That is the name of a subdirectory. But xlswrite expects a file *name*
ending on e.g., .xlsx as its first argument.
> Sheet1(1,1) = {'Tubes de longueur L ='};
> Sheet1(2,1) = {'Nombre d''intervalles N ='};
> Sheet1(3,1) = {'Rapport L/N ='};
> Sheet1(1,2) = {L};
> Sheet1(2,2) = {N};
> Sheet1(3,2) = {pas};
>
> Status = xlswrite(Directory, Sheet1, 'NameOfTheSheet');
That creates a file called ".xls" in the current directory. AFAIK on Windows
files should have a name, so this uncovered a bug.
> Great! That works, my file is created.
> But first it is never in the directory that I called in the xlswrite.
Of course not. You didn't specify a file name.
> Second, I try to do the same for a sheet2 with : but that overwrite
> everything and i loose all my first data.
> How to do if i want several worksheet in one file.xls?
For a start, specify a file name ending on ".xlsx", along the lines of
Directory = [pwd '\Report\' 'myfile.xlsx'];
Philip
--
View this message in context:
http://octave.1599824.n4.nabble.com/xlswrite-create-xls-with-several-worksheet-tp4676404p4676433.html
Sent from the Octave - General mailing list archive at Nabble.com.
- xlswrite : create xls with several worksheet, Littleboy, 2016/04/21
- Re: xlswrite : create xls with several worksheet, Doug Stewart, 2016/04/21
- Re: xlswrite : create xls with several worksheet, Littleboy, 2016/04/21
- Re: xlswrite : create xls with several worksheet,
PhilipNienhuis <=
- Re: xlswrite : create xls with several worksheet, Littleboy, 2016/04/22
- Re: xlswrite : create xls with several worksheet, Nicholas Jankowski, 2016/04/22
- Re: xlswrite : create xls with several worksheet, PhilipNienhuis, 2016/04/22
- Re: xlswrite : create xls with several worksheet, Nicholas Jankowski, 2016/04/22
- Re: xlswrite : create xls with several worksheet, PhilipNienhuis, 2016/04/22
- Re: xlswrite : create xls with several worksheet, Nicholas Jankowski, 2016/04/22
- Re: xlswrite : create xls with several worksheet, Nicholas Jankowski, 2016/04/22
- Re: xlswrite : create xls with several worksheet, Nicholas Jankowski, 2016/04/22
- Re: xlswrite : create xls with several worksheet, Philip Nienhuis, 2016/04/22