Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to suppress overwrite prompts
I have written a C# program to process a large number (1,500) Excel files.
Some of these files are in version 4.0, so I get the following prompt which stops processing until I manually respond: "(file name) is a Microsoft Excel 4.0 Worksheet. Do you want to overwrite with the latest Excel format?" I always want to overwrite, and I do not want to see this prompt. What can I do? Here is the critical code: Excel.ApplicationClass oEx = new Excel.ApplicationClass(); Excel.Worksheet oWS = (Excel.Worksheet) oEx.Workbooks[1].Worksheets[1]; Excel.Range oRange = (Excel.Range) oWS.Cells; //...do processing oEx.AlertBeforeOverwriting = false; //I thought this property would do the job, but apparently not oEx.PromptForSummaryInfo = false; oEx.Workbooks[1].Close(Excel.XlSaveAction.xlSaveChanges, Missing.Value, Missing.Value); oEx.Workbooks.Close(); |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to suppress overwrite prompts
Try changing:
oEx.AlertBeforeOverwriting = false To: oEx.DisplayAlerts = False HTH, Merjet |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I suppress the "Do you want to overwrite the destination cells" message | Setting up and Configuration of Excel | |||
Formula Prompts | Excel Discussion (Misc queries) | |||
Prompts | Excel Discussion (Misc queries) | |||
How can I suppress prompts during macro run? | Excel Discussion (Misc queries) | |||
Excel prompts me to save a copy or overwrite file. | Excel Worksheet Functions |