Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
clearing excel sheet values
#2
Not Solved
use the below function
Code:
Public Function BIP_xlsDeleteRowRange (sSrcPath, sDestPath, sStartRow, sEndRow) ‘Create Excel object
Set oExcel = CreateObject(“Excel.Application”)
‘Sets the application to raise no app alerts
‘In this case it will allow a file overwrite w/o raising a ‘yes/no’ dialog
oExcel.DisplayAlerts = False

‘Open Book in Excel
Set oBook = oExcel.Workbooks.Open(sSrcPath)
‘Set Activesheet
Set oSheet = oExcel.Activesheet

‘Delete row range
oSheet.Rows(sStartRow +”:”+ sEndRow).Delete

‘Save new book to Excel file
oBook.SaveAs (sDestPath)

‘Close the xls file
oExcel.Workbooks.Close()

End Function
Reply


Messages In This Thread
clearing excel sheet values - by beejfred - 09-19-2014, 01:31 AM
RE: clearing excel sheet values - by vinod123 - 09-25-2014, 11:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help for copying values from one excel to another excel vinodhiniqa 0 1,359 07-06-2017, 05:33 PM
Last Post: vinodhiniqa
  Reading data from excel sheet serenediva 1 9,597 03-03-2017, 10:07 AM
Last Post: vinod123
  How import final calculated values by cell formula from Excel not the formula itself. qtped 1 4,851 01-17-2017, 04:05 PM
Last Post: sagar.raythatha
  inetcpl.cpl not clearing SSL cache when tests are run from ALM msacks 2 2,974 09-28-2016, 10:12 PM
Last Post: msacks
Smile Importing Excel sheet - Reference Values are not recognized michiusa69 3 7,878 01-23-2015, 02:36 AM
Last Post: lkng2001

Forum Jump:


Users browsing this thread: 2 Guest(s)