473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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.AlertBeforeOverwriting = False
oExcel.DisplayAlerts = False

I will be greatful for any pointers in this regard.

Many thanks,

--
Wazir

Nov 20 '05 #1
5 5591
> 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.Application.DisplayAlerts = 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.public.Excel.programming NG kindly pointed out that
while opening the file UpdateLinks property can be set to False

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

Regards

--
Wazir

"scorpion53061" <sc************@nospamhereeveryahoo.com> wrote in message
news:O7**************@tk2msftngp13.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.Application.DisplayAlerts = 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***@nospamkjmsolutions.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.Application.DisplayAlert = False
2. myExcel.DisplayAlert = False

3. myWorkbook = myExcel.activeworkbook
myWorkbook.Application.DisplayAlert = 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
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...
2
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...
1
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...
1
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...
2
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...
4
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...
13
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...
1
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...
1
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...

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.