Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Saving an excel file with the same name and same location after updating few columns
#1
Solved: 11 Years, 4 Months, 3 Weeks ago MyBB 
Code:
Set objexcel=createobject("excel.application")
Set objworkbook=objexcel.Workbooks.Open("C:\test.xls")
Set objworksheet1=objworkbook.worksheets("test")
objWorksheet1.cells(Row,Column)=Value

objexcel.objworkbook.save


The above line to save the work book is giving me a excel pop up saying that, an excel already exist in the same name. Do you want to save in a different name?

I want to save the same work book. How to do.
Please help
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
You need to disable the display alert option.

Use the below code

Code:
Set objexcel=createobject("excel.application")
Set objworkbook=objexcel.Workbooks.Open("C:\test.xls")
Set objworksheet1=objworkbook.worksheets("test")

objexcel.DisplayAlerts=False 'This will not display any popup

objWorksheet1.cells(Row,Column)=Value
objexcel.objworkbook.save


Regards,
Ankesh
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Identify and Count the columns in the datatable Bhuvana 0 972 12-20-2019, 11:15 PM
Last Post: Bhuvana
  How to export the output value of a webedit object to a new excel file. mounika6677 1 1,580 04-14-2019, 05:18 PM
Last Post: mounika6677
  Access not saved excel file randhirsinghskhn 0 1,076 09-04-2018, 07:26 AM
Last Post: randhirsinghskhn
  How to paste file location in QTP camillelola 0 1,559 08-09-2018, 10:54 AM
Last Post: camillelola
  dtLocalSheet empty even though excel file contains data cantorre 2 2,451 05-10-2017, 12:47 PM
Last Post: vidhi

Forum Jump:


Users browsing this thread: 1 Guest(s)