User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 455,864 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,605 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

A file named 'RESUME.XLW' already exists in this location.

Join Date: Jul 2008
Posts: 14
Reputation: karang is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
karang karang is offline Offline
Newbie Poster

A file named 'RESUME.XLW' already exists in this location.

  #1  
Jul 23rd, 2008
Hi

I have a textbox and a button on a html page. On click of button I want to save the value in the textbox to a particular cell of the excel file



I have written the following code



 var ExcelSheet = new ActiveXObject("Excel.Application");


        ExcelSheet.Workbooks.Open("D:\\TEST.XLS");
       
        // Make Excel visible through the Application object.
        ExcelSheet.Application.Visible = false;
       
        // Place some text in the first cell of the sheet.
        ExcelSheet.ActiveSheet.Cells(2,1).Value = document.forms[0].txtName.value ;
       
       
        // Save the sheet.
        ExcelSheet.Save();
        
        ExcelSheet.DisplayAlerts = false;
        // Close Excel with the Quit method on the Application object.
        ExcelSheet.Application.Quit();
        // Release the object variable.
        ExcelSheet = "";


Everything works fine. The value is stored in excel but when I click the button to save I am getting a message

"A file named 'RESUME.XLW' already exists in this location. "

I have also written

ExcelSheet.DisplayAlerts = false;

But still I am getting the message.

Why this message is coming and what is the way to supress it.

Kindly advice



Regards

Karan
Last edited by Tekmaven : Jul 24th, 2008 at 3:15 am. Reason: Code tags
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 6:13 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC