Oct2XLS produces readonly error on one computer

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

Oct2XLS produces readonly error on one computer

ijourneaux
FOr some reason on one of my computers the following script produces an a file is readonly error

xlh=xlsopen("c:/temp/test.xlsx",1,'COM');
[xlh rs] = oct2xls("Value", xlh, "test", 'A1');
xlh=xlsclose(xlh);

Checking requested interface(s):
COM*; (* = default interface)
Creating file c:/temp/test.xlsx
(oct2xls: input character array converted to 1x1 cell)
warning: xlsclose: file c:/temp/test.xlsx could not be saved. Read-only or in use elsewhere?

(File pointer preserved. Try saving again later...)

The folder exists, file doesn't exist.

This is only an issue on 1 of a dozen different computers with similar (although there must be some kind of difference) configurations.

Any thoughts on where I can look?
Reply | Threaded
Open this post in threaded view
|

Re: Oct2XLS produces readonly error on one computer

ijourneaux
I think I may have stumbled on to a possible cause. The PC that IT gave me is Win7 64bit. This is the only computer where the call to xlswrite and oct2xls give this error.

Could that be the cause? If so any workaround short of getting different OS
Reply | Threaded
Open this post in threaded view
|

Re: Oct2XLS produces readonly error on one computer

PhilipNienhuis
ijourneaux wrote
I think I may have stumbled on to a possible cause. The PC that IT gave me is Win7 64bit. This is the only computer where the call to xlswrite and oct2xls give this error.

Could that be the cause? If so any workaround short of getting different OS
Do you have 64bit Office installed?
(The COM interface probably won't work with 64bit Office.)
As the call to xlsopen seems to work OK I think it isn't the case.

Otherwise the io package should work fine on 64bit PCs.

Just try if Excel itself can write to the file.

Philip
Reply | Threaded
Open this post in threaded view
|

Re: Oct2XLS produces readonly error on one computer

ijourneaux
Yes Excel by itself can write the file.  
I was doing some searching on the web last night, supposidly there is a way to get the call to a 32bit com app to work. I hope to try that today but If it doesn't work, I will have to get IT to give me a pc with 32 bit win7
Reply | Threaded
Open this post in threaded view
|

Re: Oct2XLS produces readonly error on one computer

Philip Nienhuis
ijourneaux wrote
Yes Excel by itself can write the file.  
I was doing some searching on the web last night, supposidly there is a way to get the call to a 32bit com app to work. I hope to try that today but If it doesn't work, I will have to get IT to give me a pc with 32 bit win7
Two of my boxes are Win7 64bit; Octave + io pkg do work fine there (all spreadsheet interfaces).

Your Octave is (probably) 32 bit, the io package (tied to Octave) is 32-bit, AFAIU your MS-Office is also 32-bit, so it should all work. No need to hack into 64-32bit stubs and thunks.

Did you check in Task manager (in the "Processes" tab) if there any stray Excel invocations still running as zombie processes? or any other hidden program capable of holding on to files? If so, one of those could easily hamper proper operation of the io package.

Your other bet could be to write .xslx files (Excel 2007+) using the OCT interface. No dependencies at all are needed then.

Philip
Reply | Threaded
Open this post in threaded view
|

Re: Oct2XLS produces readonly error on one computer

ijourneaux
Philip
There are no excel zombies before I run the script. After I run the short test script above, A copy of Excel is left running in task manager.

I am hoping to be able to get back home today but have to get this solved before I go. I am going to try reinstalling Octave and the packages shortly. Just incase, I have IT prepping up a 32bit PC. I would love not to have to start over on a new computer.
Reply | Threaded
Open this post in threaded view
|

RE: Oct2XLS produces readonly error on one computer

Allen.Windhorn-2
In reply to this post by ijourneaux
Ian,

> -----Original Message-----
> From: help-octave-bounces+allen.windhorn=[hidden email]
>
> I think I may have stumbled on to a possible cause. The PC that IT
> gave me is
> Win7 64bit. This is the only computer where the call to xlswrite
> and oct2xls give this error.
>
> Could that be the cause? If so any workaround short of getting
> different OS

It may be.  I have a similar problem where Emacs says its directory
is "unsafe".  Turns out that Win7, or one of the dozens of security
programs with which IT encumbers my machine, makes some directories
appear to be read-only even when there is no other indication that
they are.  Nobody knows why.  You might try putting the file into a
different directory or even a different disk.

Regards,
Allen

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

RE: Oct2XLS produces readonly error on one computer

ijourneaux
Allen

That was it. Moved the folder to the network folder and the problem was solved. IT claims it isn't anything they are doing but this acts and smells like a policy issue
Reply | Threaded
Open this post in threaded view
|

RE: Oct2XLS produces readonly error on one computer

ijourneaux
I am back on my development computer. The problem with writing xls files now occurs on my computer and seems to be related to io 2.2.3. I have going to try confirm tomorrow by going back to version 2.2.2. Based on my experience yesterday, I can write xls files to a network drive or flash drive but can not write to my local hard drive. Every call to xlsopen leaves a hidden copy of Excel running in task manager.
Reply | Threaded
Open this post in threaded view
|

RE: Oct2XLS produces readonly error on one computer

ijourneaux
Backed out to versrion 2.2.1 and I get the same behavior so it isn't the IO package. Arrgh. This used to work. now I can't save to any drive.

Creating file E:/PrintQuality/Jobs/2014-08-21-1/2014-08-21-1+Microstick+DO_NOT_OPEN.xlsx
warning: xlsclose: file E:/PrintQuality/Jobs/2014-08-21-1/2014-08-21-1+Microstick+DO_NOT_OPEN.xlsx could not be saved. Read-only or in use elsewhere?

(File pointer preserved. Try saving again later...)
Creating file E:/PrintQuality/Jobs/2014-08-21-1/2014-08-21-1+Microstick+DO_NOT_OPEN.xlsx
(oct2xls: input character array converted to 1x1 cell)
(oct2xls: input character array converted to 1x1 cell)
warning: xlsclose: file E:/PrintQuality/Jobs/2014-08-21-1/2014-08-21-1+Microstick+DO_NOT_OPEN.xlsx could not be saved. Read-only or in use elsewhere?

(File pointer preserved. Try saving again later...)
>>
Reply | Threaded
Open this post in threaded view
|

RE: Oct2XLS produces readonly error on one computer

PhilipNienhuis
ijourneaux wrote
Backed out to versrion 2.2.1 and I get the same behavior so it isn't the IO package. Arrgh. This used to work. now I can't save to any drive.

Creating file E:/PrintQuality/Jobs/2014-08-21-1/2014-08-21-1+Microstick+DO_NOT_OPEN.xlsx
warning: xlsclose: file E:/PrintQuality/Jobs/2014-08-21-1/2014-08-21-1+Microstick+DO_NOT_OPEN.xlsx could not be saved. Read-only or in use elsewhere?

(File pointer preserved. Try saving again later...)
Creating file E:/PrintQuality/Jobs/2014-08-21-1/2014-08-21-1+Microstick+DO_NOT_OPEN.xlsx
(oct2xls: input character array converted to 1x1 cell)
(oct2xls: input character array converted to 1x1 cell)
warning: xlsclose: file E:/PrintQuality/Jobs/2014-08-21-1/2014-08-21-1+Microstick+DO_NOT_OPEN.xlsx could not be saved. Read-only or in use elsewhere?

(File pointer preserved. Try saving again later...)
>>
Just a hint:

as the message says the file ptr is preserved. One can change the filename in that struct (IIRC as a second arg to xlsclose in a next call) to at least be able to save one's work to some other place where one does have write access.

Otherwise, I found Allen's remark quite to the point: I also often encounter unexpainable write access issues at work with several other programs than just Octave. And indeed IT staff often can't explain it themselves :-)

Philip
Reply | Threaded
Open this post in threaded view
|

RE: Oct2XLS produces readonly error on one computer

ijourneaux
Thanks for the hint. I have IT doing a full court press on this as I am using Octave in several of our lab tests. The end user never actually sees Octave.  ALl they see is that the Excel file containing the results is not created.
Reply | Threaded
Open this post in threaded view
|

RE: Oct2XLS produces readonly error on one computer

ijourneaux
In reply to this post by PhilipNienhuis
Thanks for the hint. I have IT doing a full court press on this as I am using Octave in several of our lab tests. The end user never actually sees Octave.  All they see is that the Excel file containing the results is not created.
I will post what I find out.
Ian