Thread Subject: xlswrite question

Subject: xlswrite question

From: Steve

Date: 7 Apr, 2008 14:39:02

Message: 1 of 8


Hello:

I have the following xlswrite question:

I am trying to read and then write to the same excel file.
But when I tried to write back to the same file, the
following message pops up:

  "A file named 'filename' already exists in this
location. Do you want to replace it?"

Is there a simple way to turn this message off? I tried
the xlswrite1 share file, but got other errors instead.

Many thanks,
Steve

Subject: xlswrite question

From: nor ki

Date: 7 Apr, 2008 14:44:03

Message: 2 of 8

"Steve " <flyingcreek@gmail.com> wrote in message
<ftdbm6$bs4$1@fred.mathworks.com>...
>
> Hello:
>
> I have the following xlswrite question:
>
> I am trying to read and then write to the same excel file.
> But when I tried to write back to the same file, the
> following message pops up:
>
> "A file named 'filename' already exists in this
> location. Do you want to replace it?"
>
> Is there a simple way to turn this message off? I tried
> the xlswrite1 share file, but got other errors instead.
>
> Many thanks,
> Steve

HI Steve,

do you try to write your information to the same worksheet?

kinor

Subject: xlswrite question

From: Steve

Date: 7 Apr, 2008 16:27:01

Message: 3 of 8

"nor ki" <kinor.removeme@gmx.de> wrote in message
<ftdbvj$eth$1@fred.mathworks.com>...
> "Steve " <flyingcreek@gmail.com> wrote in message
> <ftdbm6$bs4$1@fred.mathworks.com>...
> >
> > Hello:
> >
> > I have the following xlswrite question:
> >
> > I am trying to read and then write to the same excel
file.
> > But when I tried to write back to the same file, the
> > following message pops up:
> >
> > "A file named 'filename' already exists in this
> > location. Do you want to replace it?"
> >
> > Is there a simple way to turn this message off? I
tried
> > the xlswrite1 share file, but got other errors instead.
> >
> > Many thanks,
> > Steve
>
> HI Steve,
>
> do you try to write your information to the same
worksheet?
>
> kinor


Hi:

No, I try to write to a different worksheet.

Thx,Steve

Subject: xlswrite question

From: nor ki

Date: 8 Apr, 2008 14:39:03

Message: 4 of 8

"Steve " <flyingcreek@gmail.com> wrote in message
<ftdi0l$m0c$1@fred.mathworks.com>...
> "nor ki" <kinor.removeme@gmx.de> wrote in message
> <ftdbvj$eth$1@fred.mathworks.com>...
> > "Steve " <flyingcreek@gmail.com> wrote in message
> > <ftdbm6$bs4$1@fred.mathworks.com>...
> > >
> > > Hello:
> > >
> > > I have the following xlswrite question:
> > >
> > > I am trying to read and then write to the same excel
> file.
> > > But when I tried to write back to the same file, the
> > > following message pops up:
> > >
> > > "A file named 'filename' already exists in this
> > > location. Do you want to replace it?"
> > >
> > > Is there a simple way to turn this message off? I
> tried
> > > the xlswrite1 share file, but got other errors instead.
> > >
> > > Many thanks,
> > > Steve
> >
> > HI Steve,
> >
> > do you try to write your information to the same
> worksheet?
> >
> > kinor
>
>
> Hi:
>
> No, I try to write to a different worksheet.
>
> Thx,Steve
>

Hi Steve,

what version do you use?
i get no error executing this with 2008a

d = 5
s = xlswrite('tempdata.xls', d, 'Temperatures', 'E1')
xlsread('tempdata.xls',4,'E1')
s = xlswrite('tempdata.xls', d, 'Temperatures', 'E3')

kinor

Subject: xlswrite question

From: Barry Williams

Date: 8 Apr, 2008 14:56:01

Message: 5 of 8

"Steve " <flyingcreek@gmail.com> wrote in message <ftdbm6
$bs4$1@fred.mathworks.com>...
>
> Hello:
>
> I have the following xlswrite question:
>
> I am trying to read and then write to the same excel
file.
> But when I tried to write back to the same file, the
> following message pops up:
>
> "A file named 'filename' already exists in this
> location. Do you want to replace it?"
>
> Is there a simple way to turn this message off? I tried
> the xlswrite1 share file, but got other errors instead.
>
> Many thanks,
> Steve

Are you leaving the file opened in Excel? If the file is
already open, that message will be generated.

Otherwise, I don't know what is going on. I use the
xlswrite function fairly often without problems.

Barry in Maryland

Subject: xlswrite question

From: Steve

Date: 8 Apr, 2008 16:58:01

Message: 6 of 8

"Barry Williams" <barry.r.williamsnospam@saic.com> wrote
in message <ftg121$dq$1@fred.mathworks.com>...
> "Steve " <flyingcreek@gmail.com> wrote in message <ftdbm6
> $bs4$1@fred.mathworks.com>...
> >
> > Hello:
> >
> > I have the following xlswrite question:
> >
> > I am trying to read and then write to the same excel
> file.
> > But when I tried to write back to the same file, the
> > following message pops up:
> >
> > "A file named 'filename' already exists in this
> > location. Do you want to replace it?"
> >
> > Is there a simple way to turn this message off? I
tried
> > the xlswrite1 share file, but got other errors instead.
> >
> > Many thanks,
> > Steve
>
> Are you leaving the file opened in Excel? If the file
is
> already open, that message will be generated.
>
> Otherwise, I don't know what is going on. I use the
> xlswrite function fairly often without problems.
>
> Barry in Maryland
>

Yes, the program is designed to keep the file open while
writing results to it. Bascially it reads information from
one weeksheet and write out results to another worksheet.
I am deploying this program so it would nice that users
won't need have to close the file or click a button.

I am running R2006b. Maybe it is time to upadte.

Thanks and please advise if anyone has more ideas, many
thanks.

Steve

Subject: xlswrite question

From: ImageAnalyst

Date: 8 Apr, 2008 17:37:29

Message: 7 of 8

On Apr 8, 12:58=A0pm, "Steve " <flyingcr...@gmail.com> wrote:
> "Barry Williams" <barry.r.williamsnos...@saic.com> wrote
> in message <ftg121$d...@fred.mathworks.com>...
>
>
>
>
>
> > "Steve " <flyingcr...@gmail.com> wrote in message <ftdbm6
> > $bs...@fred.mathworks.com>...
>
> > > Hello:
>
> > > I have the following xlswrite question:
>
> > > I am trying to read and then write to the same excel
> > file.
> > > But when I tried to write back to the same file, the
> > > following message pops up:
>
> > > =A0 "A file named 'filename' already exists in this
> > > location. Do you want to replace it?"
>
> > > Is there a simple way to turn this message off? I
> tried
> > > the xlswrite1 share file, but got other errors instead.
>
> > > Many thanks,
> > > Steve
>
> > Are you leaving the file opened in Excel? =A0If the file
> is
> > already open, that message will be generated.
>
> > Otherwise, I don't know what is going on. =A0I use the
> > xlswrite function fairly often without problems.
>
> > Barry in Maryland
>
> Yes, the program is designed to keep the file open while
> writing results to it. Bascially it reads information from
> one weeksheet and write out results to another worksheet.
> I am deploying this program so it would nice that users
> won't need have to close the file or click a button.
>
> I am running R2006b. Maybe it is time to upadte.
>
> Thanks and please advise if anyone has more ideas, many
> thanks.
>
> Steve- Hide quoted text -
>
> - Show quoted text -

Steve:
How do you do that? I'd like to do that, but when I call xlswrite I
think it opens the file, throws the data into it and closes the file.
I need to write out many arrays of data at the end of many iterations
of a loop and it's very slow. I'd like to be able to do what you do
but I didn't know it's possible, short of using COM objects.
By the way, I don't get any errors using xlswrite multiple times on
the same or different worksheets in the workbook.
Regards,
ImageAnalyst

Subject: xlswrite question

From: Yuri Geshelin

Date: 8 Apr, 2008 17:56:05

Message: 8 of 8

"Steve " <flyingcreek@gmail.com> wrote in message
<ftg86p$2dg$1@fred.mathworks.com>...

> Yes, the program is designed to keep the file open while
> writing results to it.

Hi,

To the best of my knowledge, this is impossible, regardless
of the worksheet you are writing to.

Yuri

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

rssFeed for this Thread

Contact us at files@mathworks.com