write file excel in folder

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

write file excel in folder

shivax
This post was updated on .
hi,

addpath('c:/titan/results/');

PathNameReport=strcat(OutputFolder,nomeFileExcel);
(c:/Titan/results/TitanEquity_Filtri.xlsx)

rstatus=xlswrite(PathNameReport,stringaPercentF,nomeFoglio,strCompletaData0);


i see this error:
error: xlswrite: first argument must be a filename (incl. suffix)

Ok but if i want to print file in a folder,how can do it?






--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: write file excel in folder

Andreas Weber-6
Am 04.08.2018 um 00:57 schrieb shivax:
> PathNameReport=strcat(OutputFolder,nomeFileExcel);
> (c:/Titan/results/TitanEquity_Filtri.xlsx)
> rstatus=xlswrite(PathNameReport,stringaPercentF,nomeFoglio,strCompletaData0);
>
> i see this error:
> error: xlswrite: first argument must be a filename (incl. suffix)

As you can see in xlswrite.m around line 136:
...
  elseif (! ischar (filename))
    error ("xlswrite: first argument must be a filename (incl. suffix)\n");
...

So the only check is, that it is a "char" which seems to be not the case
in your script. Please double check that PathNameReport is a char
(string) and not a cell string.

The best would be if you provide a minimal, complete and executable code
which shows the problem you encounter.

-- Andy


Reply | Threaded
Open this post in threaded view
|

Re: write file excel in folder

Andreas Weber-6
Am 04.08.2018 um 09:31 schrieb LucaLuca:

> thank for your answer
>
> you say :
> " As you can see in xlswrite.m around line 136:
> ...
>   elseif (! ischar (filename))
>     error ("xlswrite: first argument must be a filename (incl. suffix)\n");
> ...
>
> "
> how i find xlswrite.m  ? i want see this code

it's part of the installed io package. The exact localtion depends on
how you've installed it on which OS...