473,394 Members | 2,052 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,394 software developers and data experts.

Browser opening file twice

I have the code below that I call from onclick attribute I am adding to a
LinkButton. It works perfect if I use Application.Word, etc. but when I use
Application.Excel it opens the file name twice, once in regular mode and
once in "read-only". Can anyone see what I am doing wrong? Thanks.
David

function openExcel()
{
var pause = 0;
var xlDialogFileOpen = 80;
var xlApp = new ActiveXObject("Excel.Application");
xlApp.Visible = 'True';
var wb = xlApp.Workbooks;
wb.Open('N:\\FileDocs\\File092180\\0001Contract\\F ileroom Company
List.xls');
}
Apr 3 '08 #1
2 1654
Looking at your code, it seems obvious that somehow your function is being
called more than once.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net
"David C" wrote:
I have the code below that I call from onclick attribute I am adding to a
LinkButton. It works perfect if I use Application.Word, etc. but when I use
Application.Excel it opens the file name twice, once in regular mode and
once in "read-only". Can anyone see what I am doing wrong? Thanks.
David

function openExcel()
{
var pause = 0;
var xlDialogFileOpen = 80;
var xlApp = new ActiveXObject("Excel.Application");
xlApp.Visible = 'True';
var wb = xlApp.Workbooks;
wb.Open('N:\\FileDocs\\File092180\\0001Contract\\F ileroom Company
List.xls');
}
Apr 3 '08 #2
You are right. It had an onclick and an asp OnClientClick. Thanks.

David
"Peter Bromberg [C# MVP]" <pb*******@yahoo.NoSpamMaam.comwrote in message
news:3B**********************************@microsof t.com...
Looking at your code, it seems obvious that somehow your function is being
called more than once.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net
"David C" wrote:
>I have the code below that I call from onclick attribute I am adding to a
LinkButton. It works perfect if I use Application.Word, etc. but when I
use
Application.Excel it opens the file name twice, once in regular mode and
once in "read-only". Can anyone see what I am doing wrong? Thanks.
David

function openExcel()
{
var pause = 0;
var xlDialogFileOpen = 80;
var xlApp = new ActiveXObject("Excel.Application");
xlApp.Visible = 'True';
var wb = xlApp.Workbooks;
wb.Open('N:\\FileDocs\\File092180\\0001Contract\\F ileroom Company
List.xls');
}

Apr 4 '08 #3

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

Similar topics

1
by: Bob Murdoch | last post by:
I've got an intranet application that presents a list of files in sort of a 'central repository' web page. Each file is an href in the form <a href=file://server/share/path/filename.ext>. When...
12
by: Kepler | last post by:
How do you get the height of the client browser in IE? Both document.body.clientHeight and document.body.offsetHeight return the height of the document. If the page is long and there's a vertical...
5
by: John Morgan | last post by:
I am using the following link to download a file of about 50k <a target= "_blank" href="http://www.bsecs.org.uk/ExecDocs/documentStore/elfridaWord.doc">open file</a> If I save the file to...
3
by: Rob | last post by:
I have an ASP.Net web app that generates a Crystal Report in PDF format. Since there is sensitive data within the reports, the pdfs need to be streamed to the browser then deleted immediately. The...
5
by: Brad | last post by:
In several aspx applications I export crytal reports to pdf, xls and doc files and then the aspx page writes the selected export file to the client browser. This all works with one small quirk: ...
3
by: sohan | last post by:
hi I have hyperlink column in a datagrid. The column contains the name of a text file. I am able to appendthe full path of the file. The file is on D drive on the server. But on clicking on...
4
by: mammen | last post by:
Hello, I'm writing trace log of various actions happening in my ASP.NET web application by opening a text file when the user logs in to the system and closing the file while the user logs out....
22
by: V S Rawat | last post by:
(bringing the discussion here for php.general) I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL 5.0.51b. http://localhost/ is E:\wamp\www\ I have put the first php script...
1
by: alnino | last post by:
Hi, On a form I have a command button that allows a user to browse for a file (PDF, Word, etc…). This command button then stores a hyperlink to the file within an associated txtfield in the table....
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
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...

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.