help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: write empty cell in excel


From: PhilipNienhuis
Subject: Re: write empty cell in excel
Date: Mon, 28 Oct 2019 16:17:16 -0500 (CDT)

Octave - General mailing list wrote
> ok i write all problem
> 
> 
> i've do the following instruction:
> 
> pkg unload io;   ## unload the package
> clear -f;          ## needed to also unload io's binary functions from
> memory, otherwise
>                      ## it won't uninstall completely
> pkg uninstall -nodeps io;  ##  Not really needed, but doesn't harm
> pkg install -forge -verbose io  ; ## Install new io from the web
> pkg load io
> 
> after i esecute my code :
> (in my code this is the following rows:
> 
> strCompletaData0=TitanTrovaStringExcel(1,1,ty,columns(str1));      
> strCompletaTitoli=TitanTrovaStringExcel(riga+ty+1,colonna,rows(newNomeEquity),columns(newNomeEquity));
> strCompletaData=TitanTrovaStringExcel(riga+ty+5,colonna,rows(stringg),columns(stringg));
> strCompletaNum=TitanTrovaStringExcel(riga+ty+5,colonna+2,rows(matrixx),columns(matrixx));
> 
> rstatus=xlswrite(nomeFileExcel,str1,nomeFoglio,strCompletaData0);
> rstatus=xlswrite(nomeFileExcel,newNomeEquity,nomeFoglio,strCompletaTitoli); 
> rstatus=xlswrite(nomeFileExcel,stringg,nomeFoglio,strCompletaData);  
> rstatus=xlswrite(nomeFileExcel,matrixx,nomeFoglio,strCompletaNum);  
> 
> with this rows i write on excel
> 
> the octave give me following error:
> 
> warning: delete: no such file:
> c:/Titan/results/Equity/TitanStudioEquity.xlsx
> warning: called from
>     delete at line 47 column 9
>     TitanWriteExcel4 at line 112 column 7
>     TitanPrintEquity at line 10 column 1
>     PredatorVectorized at line 653 column 1
> warning: xlsclose: file c:/Titan/results/Equity/TitanStudioEquity.xlsx
> could
> not be saved.
>          Read-only? unsupported file format? in use elsewhere?
> (File pointer preserved.
>  Try saving again later, or with different file name, or as different file
> type.)
> warning: xlsclose: file c:/Titan/results/Equity/TitanStudioEquity.xlsx
> could
> not be saved.
>          Read-only? unsupported file format? in use elsewhere?
> (File pointer preserved.
>  Try saving again later, or with different file name, or as different file
> type.)
> warning: xlsclose: file c:/Titan/results/Equity/TitanStudioEquity.xlsx
> could
> not be saved.
>          Read-only? unsupported file format? in use elsewhere?
> (File pointer preserved.
>  Try saving again later, or with different file name, or as different file
> type.)
> warning: xlsclose: file c:/Titan/results/Equity/TitanStudioEquity.xlsx
> could
> not be saved.
>          Read-only? unsupported file format? in use elsewhere?
> (File pointer preserved.
>  Try saving again later, or with different file name, or as different file
> type.)
> warning: xlsclose: file c:/Titan/results/Equity/TitanStudioEquity.xlsx
> could
> not be saved.
>          Read-only? unsupported file format? in use elsewhere?
> (File pointer preserved.

IMO the error messages are clear enough.
I suppose you have the file opened in some other program as well (Excel?);
that other program will keep the file locked.

But to your credit, this may very well be caused by earlier errors. It's
known that with the COM interface, zombie Excel invocations may linger on
after hitting errors; one of those may easily keep your .xlsx file
locked.The issue is, you can't see them - not just like that.
Solution for that:
Right-click the Windows task bar, select "Task manager", in "Processes" tab
search for, and right-click + select "End process", all EXCEL.EXE
invocations you see.

If all this doesn't work, reboot (the classic Windows solve-it-all action).

Philip




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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]