Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Exporting to Exel

Subject: Exporting to Exel

From: Inbanathan Govender

Date: 29 Oct, 2012 10:05:08

Message: 1 of 5

Hi,

I would like to write to an exel file, however when I try to do this with the exel file open, I get the following error: The file 'is not writable. It may be
locked by another process'. How do I go around this without having to close the Exel file

Regards,
Inbanathan

Subject: Exporting to Exel

From: Barry Williams

Date: 30 Oct, 2012 19:16:08

Message: 2 of 5

"Inbanathan Govender" <govender.inbanathan@gmail.com> wrote in message <k6lkck$m5j$1@newscl01ah.mathworks.com>...
> Hi,
>
> I would like to write to an exel file, however when I try to do this with the exel file open, I get the following error: The file 'is not writable. It may be
> locked by another process'. How do I go around this without having to close the Exel file
>
> Regards,
> Inbanathan

Are you using xlswrite? I don't know that it's possible to write to the file while it's open because the read only bit in the file is set while it's open in Excel.
Barry

Subject: Exporting to Exel

From: Ryan

Date: 3 Nov, 2012 04:45:14

Message: 3 of 5

Take a look at this for some ideas:
http://www.mathworks.com/help/matlab/ref/xlswrite.html

Just so you know, Excel does not really allow file sharing (you can't write to the file when someone else has it open on a network drive). There are ways around it, but I don't think you want to go down that path, as it makes the file VERY unstable and susceptible to corruption. Just use a database if you really want multi-user control.



"Barry Williams" <barry.r.williamsnospam@saic.com> wrote in message <k6p91o$k5b$1@newscl01ah.mathworks.com>...
> "Inbanathan Govender" <govender.inbanathan@gmail.com> wrote in message <k6lkck$m5j$1@newscl01ah.mathworks.com>...
> > Hi,
> >
> > I would like to write to an exel file, however when I try to do this with the exel file open, I get the following error: The file 'is not writable. It may be
> > locked by another process'. How do I go around this without having to close the Exel file
> >
> > Regards,
> > Inbanathan
>
> Are you using xlswrite? I don't know that it's possible to write to the file while it's open because the read only bit in the file is set while it's open in Excel.
> Barry

Subject: Exporting to Exel

From: Barry Williams

Date: 5 Nov, 2012 13:18:07

Message: 4 of 5

> "Barry Williams" <barry.r.williamsnospam@saic.com> wrote in message <k6p91o$k5b$1@newscl01ah.mathworks.com>...
> > "Inbanathan Govender" <govender.inbanathan@gmail.com> wrote in message <k6lkck$m5j$1@newscl01ah.mathworks.com>...
> > > Hi,
> > >
> > > I would like to write to an exel file, however when I try to do this with the exel file open, I get the following error: The file 'is not writable. It may be
> > > locked by another process'. How do I go around this without having to close the Exel file
> > >
> > > Regards,
> > > Inbanathan
> >
> > Are you using xlswrite? I don't know that it's possible to write to the file while it's open because the read only bit in the file is set while it's open in Excel.
> > Barry
>
"Ryan" wrote in message <k727gq$a8u$1@newscl01ah.mathworks.com>...
> Take a look at this for some ideas:
> http://www.mathworks.com/help/matlab/ref/xlswrite.html
>
> Just so you know, Excel does not really allow file sharing (you can't write to the file when someone else has it open on a network drive). There are ways around it, but I don't think you want to go down that path, as it makes the file VERY unstable and susceptible to corruption. Just use a database if you really want multi-user control.
>
At least in my version of xlswrite (7.2, so a bit old) and on a Windows machine, if the spreadsheet is open, the data will not write. Unfortunately, even if you use the optional status and message outputs, no error is generated. and the status gives a *true* indicating the data was written.
Barry

Subject: Exporting to Exel

From: Inbanathan Govender

Date: 6 Nov, 2012 08:42:07

Message: 5 of 5

"Barry Williams" <barry.r.williamsnospam@saic.com> wrote in message <k78eaf$cr1$1@newscl01ah.mathworks.com>...
> > "Barry Williams" <barry.r.williamsnospam@saic.com> wrote in message <k6p91o$k5b$1@newscl01ah.mathworks.com>...
> > > "Inbanathan Govender" <govender.inbanathan@gmail.com> wrote in message <k6lkck$m5j$1@newscl01ah.mathworks.com>...
> > > > Hi,
> > > >
> > > > I would like to write to an exel file, however when I try to do this with the exel file open, I get the following error: The file 'is not writable. It may be
> > > > locked by another process'. How do I go around this without having to close the Exel file
> > > >
> > > > Regards,
> > > > Inbanathan
> > >
> > > Are you using xlswrite? I don't know that it's possible to write to the file while it's open because the read only bit in the file is set while it's open in Excel.
> > > Barry
> >
> "Ryan" wrote in message <k727gq$a8u$1@newscl01ah.mathworks.com>...
> > Take a look at this for some ideas:
> > http://www.mathworks.com/help/matlab/ref/xlswrite.html
> >
> > Just so you know, Excel does not really allow file sharing (you can't write to the file when someone else has it open on a network drive). There are ways around it, but I don't think you want to go down that path, as it makes the file VERY unstable and susceptible to corruption. Just use a database if you really want multi-user control.
> >
> At least in my version of xlswrite (7.2, so a bit old) and on a Windows machine, if the spreadsheet is open, the data will not write. Unfortunately, even if you use the optional status and message outputs, no error is generated. and the status gives a *true* indicating the data was written.
> Barry

Thanks for the help

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us