Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving workbook in code


Hi
I am Rajesh. I am stuck in a big big problem. PLease help me out...

I want to open a work book in a xls file using C# code in the page-load
event of an ASP.NET page, write two values into two cells (using code),
save that workbook and redirect the browser to show that xls file

But when the workbook.save statement is being executed, a dialog is
being thrown at me saying that "A file with name <file1.xls already
exists. Do u want to replace it?"

1) How can I save that xls file without that dialog?

And after saving when I redirect the browser to show that xls file,
that is becoming a read-only copy. I think this is due to an Excel.exe
instance running already in memory.

2) How can I make that xls file a writable one in when it is displayed
in browser?

Please help me.....

Many Many thanks in advance
Rajesh


--
harkit
------------------------------------------------------------------------
harkit's Profile: http://www.excelforum.com/member.php...o&userid=25764
View this thread: http://www.excelforum.com/showthread...hreadid=391732

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Saving workbook in code

Rajesh,

For your question #1, the usual method is to use this befo

Application.DisplayAlerts = False

and use this after

Application.DisplayAlerts = True

where Application is the Excel object, so change to reflect your actual coding.

HTH,
Bernie
MS Excel MVP


"harkit" wrote in message
...

Hi
I am Rajesh. I am stuck in a big big problem. PLease help me out...

I want to open a work book in a xls file using C# code in the page-load
event of an ASP.NET page, write two values into two cells (using code),
save that workbook and redirect the browser to show that xls file

But when the workbook.save statement is being executed, a dialog is
being thrown at me saying that "A file with name <file1.xls already
exists. Do u want to replace it?"

1) How can I save that xls file without that dialog?

And after saving when I redirect the browser to show that xls file,
that is becoming a read-only copy. I think this is due to an Excel.exe
instance running already in memory.

2) How can I make that xls file a writable one in when it is displayed
in browser?

Please help me.....

Many Many thanks in advance
Rajesh


--
harkit
------------------------------------------------------------------------
harkit's Profile: http://www.excelforum.com/member.php...o&userid=25764
View this thread: http://www.excelforum.com/showthread...hreadid=391732



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Programatically saving workbook (or worksheet) without the code Hugh Excel Programming 4 October 22nd 04 12:03 AM
Saving a Workbook: Forcing User to Rename before Saving Rollin_Again[_6_] Excel Programming 5 April 16th 04 02:54 PM
ChartCalculate code causing error when saving workbook Pete McCosh[_5_] Excel Programming 0 February 19th 04 03:00 PM
SAVING A COPY OF WORKBOOK W/O THE CODE IN IT gr8guy Excel Programming 2 January 22nd 04 10:18 AM
Saving a Workbook without code KimberlyC Excel Programming 1 August 21st 03 07:07 PM


All times are GMT +1. The time now is 12:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"