Hi all,
   
  Can any one help me on this please......I have a query regarding saving an 
Excel file from Delphi.I have a  existing Excel file .From Delphi I open this 
Excel file and wirting into it.
   
  While saving the Excel file it will dislplay a confirm dialog box with a 
message text   " A filename  c:\book1.xls already exists in this location .Do 
you want to replace it ?"
  How can i overwrite/save  this file from delphi with out a confirm dialog box 
displayed....Please help me .
  Please see the code below.....
   
   
  Var
  XLApp: Olevariant;
    XlsFileName : string;    
      Sheet Variant;
 
  
  XlsFileName :='c:\book1.xls';
      XLApp := CreateOleObject('Excel.Application');
    XLApp.Visible :=false;
      XLApp.Workbooks.Open(XlsFileName);  
  Sheet := XLApp.Workbooks[1].Worksheets[1];  
    
        XLApp.Cells[2,1].value   :='Computer' ;
         Sheet.Cells[2,2]   :='systems' ;     
        XLApp.Workbooks[1].saveas(XlsFileName);
   
   
  Thanks in advance 
  Kiran Kumar
  _____________________

       
---------------------------------
Pinpoint customers who are looking for what you sell. 

[Non-text portions of this message have been removed]

Reply via email to