Browser opening file twice
am 03.04.2008 22:23:17 von David C
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\\Fileroom Company
List.xls');
}
RE: Browser opening file twice
am 04.04.2008 01:40:00 von pbromberg
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\\Fileroom Company
> List.xls');
> }
>
>
>
Re: Browser opening file twice
am 04.04.2008 21:13:08 von David C
You are right. It had an onclick and an asp OnClientClick. Thanks.
David
"Peter Bromberg [C# MVP]" wrote in message
news:3B05DAA9-E2EF-4CB2-A0E6-7BF4B616BA42@microsoft.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\\Fileroom Company
>> List.xls');
>> }
>>
>>
>>