473,769 Members | 4,985 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Process excel files, suppress alerts

Dear all,

I have a .NET app that processes some excel file and it was working in all
scenarios.

Recently however we received excel files from a new client which my
application has been unable to process. The problem is that this file has
external links and when you open the excel file, it prompts you to either
update linked information or keep exisiting information.

Since my application runs in a non UI mode, there is no way for me to
respond to this request. I have tried suppressing these message boxes but
have been unable to do so.

I have tried the following to no avail

oExcel.Visible = False
oExcel.AlertBef oreOverwriting = False
oExcel.DisplayA lerts = False

I will be greatful for any pointers in this regard.

Many thanks,

--
Wazir

Nov 20 '05 #1
5 5620
> Recently however we received excel files from a new client which my
application has been unable to process. The problem is that this file has
external links and when you open the excel file, it prompts you to either
update linked information or keep exisiting information.


Try

xlsdoc.Applicat ion.DisplayAler ts = False

to address the sheet within the application.

Nov 20 '05 #2
Hi there,

Thanks for the response. I have already tried DisplayAlerts = False

Simon from the microsoft.publi c.Excel.program ming NG kindly pointed out that
while opening the file UpdateLinks property can be set to False

ie. oExcel.Workbook s.Open (Filename := strFilename, UpdateLinks := False,
ReadOnly := True)

Regards

--
Wazir

"scorpion53 061" <sc************ @nospamhereever yahoo.com> wrote in message
news:O7******** ******@tk2msftn gp13.phx.gbl...
Recently however we received excel files from a new client which my
application has been unable to process. The problem is that this file has external links and when you open the excel file, it prompts you to either update linked information or keep exisiting information.


Try

xlsdoc.Applicat ion.DisplayAler ts = False

to address the sheet within the application.

Nov 20 '05 #3
> Thanks for the response. I have already tried DisplayAlerts = False

Did you try it as I showed you?

Nov 20 '05 #4
> Recently however we received excel files from a new client which my
application has been unable to process. The problem is that this file has
external links and when you open the excel file, it prompts you to either
update linked information or keep exisiting information.

Please send a sample of this file I can work with to
ad***@nospamkjm solutions.com
Nov 20 '05 #5
> Did you try it as I showed you?

I have tried your suggestion before with all sort of combinations I could
think of and I am afraid it did not work for me.

I have tried in the past

1. myWorkbook.Appl ication.Display Alert = False
2. myExcel.Display Alert = False

3. myWorkbook = myExcel.activew orkbook
myWorkbook.Appl ication.Display Alert = False

DisplayAlerts would have no consequence to opening external links as this
MSDN documentation shows:

Here is the MSDN documentation for UpdateLinks.

UpdateLinks Optional Variant
Specifies the way links in the file are updated. If this argument is
omitted, the user is prompted to specify how links will be updated.
Otherwise, this argument is one of the values listed in the following table.

0 Doesn't update any references
1 Updates external references but not remote references
2 Updates remote references but not external references
3 Updates both remote and external references

Unfortunatly for me, until someone pointed out I did not know this feature.

I hope that clarifies the issue,
Thanks for your response.

--
Wazir



Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
8683
by: Chris Powell | last post by:
I am using Excel/Access 2000 and have two large Excel files (25,000 rows each) that I wish to create linked tables in Access rather than importing into Access. The two source Excel files change frequently, so I want to: A) prompt the user, using a custom form, for the specific Excel files to be linked; B) create the links dynamically; C) insert the linked tables into a select query grid and include the SQL statement in the VBA...
2
1311
by: Lynn A. | last post by:
I have a process that is currently in 4 separate steps that are operated by individual buttons on a form in Access. In Access: Button 1. Select the csv file to open (filename gets stored in text box) Button 2. Open the csv file in Excel with Access still running in the background (in Excel several macros are run to modify csv file so that it only has the usable data in it, save the file as an xls File, close Excel) Button 3. Select the...
1
10746
by: javzxp | last post by:
Hi I'd like to use C# to open an existing Excel workbook and save each worksheet it contains into a new Excel file. The name of each new Excel file should be the name of the worksheet copied from the existing file. So, as an example:
1
2305
by: Michael Tkachev | last post by:
Hi Everybody, I created an Excel file in the ASP.Net. When I wrote this file on the disk I tryed to release COM objects. But I couldn't do it. When my method finished an "Excel" process exists in the memory. So, I would like to kill an "Excel" process and for it I need to know a ProcessID or something like this. Who knows how can I get a processID or release COM objects? Excel.ApplicationClass a = new Excel.ApplicationClass();
2
2158
by: touf | last post by:
Hi, I use the folowing code to create a new Excel file using a query It creates an excel file and save it on the disc, but When I double-clic on it (explorer) it open Excel and bloc,(don't display the data), it does the same with all excel files. I've found that it creates a process called Excel, when I end it (Windows Task Manager) the problem is resolved. I think that I need somewhere to kill the process..(I use oExcel.Quit() but
4
17453
by: nick | last post by:
Is it possible to disable/suppress alert popups in javascript? I need to write a function that will loop through a form's inputs and "manually" fire their onchange events (if found). Some of those functions could popup alert boxes which I'd like to be able to temporarily suppress. Thanks for any help.
13
3013
by: chuckie_9497 | last post by:
hello all you gurus. I am struggling with releasing com objects. I have isolated the problem to the code below. Objects are released and the process ends until I use "int k = sheet.Count;" Then the process does not end. So I feel confident the problem occurrs here. It appears another reference is created that needs to be closed. Can anyone tell me how to do this? :) Thank you Excel.Workbook workbook =
1
2181
by: psuaudi | last post by:
I’m using a vb.net app that opens a powerpoint presentation and calls the updatelinks function of powerpoint. One slide in the presentation is linked to a cell range in an excel file, and the excel file has links to other excel files within it. When my program reaches this slide, it opens the powerpoint slide, then opens the excel file, then it prompts the user to select whether or not they want to update the links within excel. ...
1
6982
by: raul15791 | last post by:
Hi, I'm new to C#. I'm writing a program that open a new excel file, write into it and lastly close the file. But the program is that there will be a orphaned process named EXCEL.EXE left on the process queue whenever the program quit. Anyway to terminate it automatically when the application exit? I read some previous postings on the same problem and try to use Marshal.ReleaseCOMObject and Garbage Collection. None of these works. Here's my...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9994
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.