Hello,
How can I disable that message/question that appears when my program edits
an Excel file?
Here's the code:
Excel.Application excelApp = new Excel.ApplicationClass();
Excel.Workbook excelWorkbook = excelApp.Workbooks.Open( fileName, 0, false,
5, "", "", false, Excel.XlPlatform.xlWindows, "", true, false, 0, true,
false, false);
Excel.Sheets excelSheets = excelWorkbook.Worksheets;
Excel.Worksheet excelWorksheet =
(Excel.Worksheet)excelSheets.get_Item("Sheet1");
excelWorksheet.get_Range("A1", "A1").Value2 = "'Testing";
excelWorksheet.get_Range("A2", "A2").Value2 = "'Example";
etc. etc.
excelApp.Workbooks.Close();
The question that appears (from Excel) is the following "Do you want to save
changes you made to <filename>?"
Any ideas?
Thanks,
David 6 11596
you can't write C# in Excel can you?
On Feb 13, 10:38 pm, David <D...@discussions.microsoft.comwrote:
Hello,
How can I disable that message/question that appears when my program edits
an Excel file?
Here's the code:
Excel.Application excelApp = new Excel.ApplicationClass();
Excel.Workbook excelWorkbook = excelApp.Workbooks.Open( fileName, 0, false,
5, "", "", false, Excel.XlPlatform.xlWindows, "", true, false, 0, true,
false, false);
Excel.Sheets excelSheets = excelWorkbook.Worksheets;
Excel.Worksheet excelWorksheet =
(Excel.Worksheet)excelSheets.get_Item("Sheet1");
excelWorksheet.get_Range("A1", "A1").Value2 = "'Testing";
excelWorksheet.get_Range("A2", "A2").Value2 = "'Example";
etc. etc.
excelApp.Workbooks.Close();
The question that appears (from Excel) is the following "Do you want to save
changes you made to <filename>?"
Any ideas?
Thanks,
David
and I believe that there is an optional parameter to the close method
that says 'save changes' or prompt to save changes.
if you open up Excel, and you go.. Tools, Visual C# Editor.
OH WAIT A SECOND, C# IS FOR FUCKING FAGS AND DOESNT WORK WITH MS
OFFICE DOES IT??
On Feb 13, 10:38 pm, David <D...@discussions.microsoft.comwrote:
Hello,
How can I disable that message/question that appears when my program edits
an Excel file?
Here's the code:
Excel.Application excelApp = new Excel.ApplicationClass();
Excel.Workbook excelWorkbook = excelApp.Workbooks.Open( fileName, 0, false,
5, "", "", false, Excel.XlPlatform.xlWindows, "", true, false, 0, true,
false, false);
Excel.Sheets excelSheets = excelWorkbook.Worksheets;
Excel.Worksheet excelWorksheet =
(Excel.Worksheet)excelSheets.get_Item("Sheet1");
excelWorksheet.get_Range("A1", "A1").Value2 = "'Testing";
excelWorksheet.get_Range("A2", "A2").Value2 = "'Example";
etc. etc.
excelApp.Workbooks.Close();
The question that appears (from Excel) is the following "Do you want to save
changes you made to <filename>?"
Any ideas?
Thanks,
David
Try this:
excelApp.DisplayAlerts = False
excelApp.Workbooks.Close()
excelApp.DisplayAlerts = True
Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
----------------------------------------------------------
"David" <Da***@discussions.microsoft.comwrote in message
news:1B**********************************@microsof t.com...
Hello,
How can I disable that message/question that appears when my program
edits
an Excel file?
Here's the code:
Excel.Application excelApp = new Excel.ApplicationClass();
Excel.Workbook excelWorkbook = excelApp.Workbooks.Open( fileName, 0,
false,
5, "", "", false, Excel.XlPlatform.xlWindows, "", true, false, 0, true,
false, false);
Excel.Sheets excelSheets = excelWorkbook.Worksheets;
Excel.Worksheet excelWorksheet =
(Excel.Worksheet)excelSheets.get_Item("Sheet1");
excelWorksheet.get_Range("A1", "A1").Value2 = "'Testing";
excelWorksheet.get_Range("A2", "A2").Value2 = "'Example";
etc. etc.
excelApp.Workbooks.Close();
The question that appears (from Excel) is the following "Do you want to
save
changes you made to <filename>?"
Any ideas?
Thanks,
David
That removed the message thanks, but now my Excel document does not contain
any of the edits that my program made.
Is there anything more you can suggest?
Thank,
David
"RobinS" wrote:
Try this:
excelApp.DisplayAlerts = False
excelApp.Workbooks.Close()
excelApp.DisplayAlerts = True
Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
----------------------------------------------------------
"David" <Da***@discussions.microsoft.comwrote in message
news:1B**********************************@microsof t.com...
Hello,
How can I disable that message/question that appears when my program
edits
an Excel file?
Here's the code:
Excel.Application excelApp = new Excel.ApplicationClass();
Excel.Workbook excelWorkbook = excelApp.Workbooks.Open( fileName, 0,
false,
5, "", "", false, Excel.XlPlatform.xlWindows, "", true, false, 0, true,
false, false);
Excel.Sheets excelSheets = excelWorkbook.Worksheets;
Excel.Worksheet excelWorksheet =
(Excel.Worksheet)excelSheets.get_Item("Sheet1");
excelWorksheet.get_Range("A1", "A1").Value2 = "'Testing";
excelWorksheet.get_Range("A2", "A2").Value2 = "'Example";
etc. etc.
excelApp.Workbooks.Close();
The question that appears (from Excel) is the following "Do you want to
save
changes you made to <filename>?"
Any ideas?
Thanks,
David
save your spreadsheet you fucking retard
On Feb 15, 10:38 pm, David <D...@discussions.microsoft.comwrote:
That removed the message thanks, but now my Excel document does not contain
any of the edits that my program made.
Is there anything more you can suggest?
Thank,
David
"RobinS" wrote:
Try this:
excelApp.DisplayAlerts = False
excelApp.Workbooks.Close()
excelApp.DisplayAlerts = True
Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
----------------------------------------------------------
"David" <D...@discussions.microsoft.comwrote in message
news:1B**********************************@microsof t.com...
Hello,
How can I disable that message/question that appears when my program
edits
an Excel file?
Here's the code:
Excel.Application excelApp = new Excel.ApplicationClass();
Excel.Workbook excelWorkbook = excelApp.Workbooks.Open( fileName, 0,
false,
5, "", "", false, Excel.XlPlatform.xlWindows, "", true, false, 0, true,
false, false);
Excel.Sheets excelSheets = excelWorkbook.Worksheets;
Excel.Worksheet excelWorksheet =
(Excel.Worksheet)excelSheets.get_Item("Sheet1");
excelWorksheet.get_Range("A1", "A1").Value2 = "'Testing";
excelWorksheet.get_Range("A2", "A2").Value2 = "'Example";
etc. etc.
excelApp.Workbooks.Close();
The question that appears (from Excel) is the following "Do you want to
save
changes you made to <filename>?"
Any ideas?
Thanks,
David- Hide quoted text -
- Show quoted text -
Did you save the Excel workbook before closing it?
Robin S.
---------------------------------------
"David" <Da***@discussions.microsoft.comwrote in message
news:6B**********************************@microsof t.com...
That removed the message thanks, but now my Excel document does not
contain
any of the edits that my program made.
Is there anything more you can suggest?
Thank,
David
"RobinS" wrote:
>Try this:
excelApp.DisplayAlerts = False excelApp.Workbooks.Close() excelApp.DisplayAlerts = True
Robin S. Ts'i mahnu uterna ot twan ot geifur hingts uto. ---------------------------------------------------------- "David" <Da***@discussions.microsoft.comwrote in message news:1B**********************************@microso ft.com...
Hello,
How can I disable that message/question that appears when my program
edits
an Excel file?
Here's the code:
Excel.Application excelApp = new Excel.ApplicationClass();
Excel.Workbook excelWorkbook = excelApp.Workbooks.Open( fileName, 0,
false,
5, "", "", false, Excel.XlPlatform.xlWindows, "", true, false, 0,
true,
false, false);
Excel.Sheets excelSheets = excelWorkbook.Worksheets;
Excel.Worksheet excelWorksheet =
(Excel.Worksheet)excelSheets.get_Item("Sheet1");
excelWorksheet.get_Range("A1", "A1").Value2 = "'Testing";
excelWorksheet.get_Range("A2", "A2").Value2 = "'Example";
etc. etc.
excelApp.Workbooks.Close();
The question that appears (from Excel) is the following "Do you want
to
save
changes you made to <filename>?"
Any ideas?
Thanks,
David
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Paul |
last post by:
Hi all
Arggghhh...........
The problem.....I want the user to be able to create an excel document and
name particular cells in the document where they want the data to be placed
and then save...
|
by: volume |
last post by:
Hi all,
In an effort to try to impress the boss, I would like to log accounting information to an Excel spreadsheet using C# and .NET. This would be a mockup only, not a real solution - yet!
We...
|
by: Amy B |
last post by:
Hi,
I've been trying to figure out how to fix this for several days but
nothing I have done so far seems to work. I have posted this message
in a Google Excel Programming group, but did not...
|
by: Bon |
last post by:
Hello all
I create a form with three buttons in MS Access 2000. They are Open
Excel Template, Save Draft and Save Final. When I click the Open Excel
Template button, the Excel template will be...
|
by: wubin_98 |
last post by:
Hi,
I want to export a gridview data and a image from image control to
export to an Excel document.
When I executed following code, GridView data was exported to Excel
properly. But no image...
|
by: Jono |
last post by:
Hello,
I've been getting this message when closing excel (not necessarily when closing the workbook by itself, but when closing Excel and the workbook at the same time):
...
|
by: K Viltersten |
last post by:
I understand that the new versions of MS
Word, MS Excel etc. allow for creation of
a document using XML tags (the technique
or format is called OOXML, i think).
I imagine that the idea behind...
|
by: stephen |
last post by:
Hi all,
I am working with Excel. I read an excel document using ExcelReader and lets
say it has 10 columns. I have to read each record and based on a specified
column peform some activites and...
|
by: ronparker |
last post by:
Hello,
This is my first time posting and just my second day using python on mysql, so please be patient with me. I should also say, I am using a linux machine. Using python I was able to make a...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |