09-18-2010, 10:53 AM
str sfile="$desktop$\Abc.xls"
str sheet="Sheet1"
;;Works the Magic...
Excel.Application app._create
Excel.Workbook book=app.Workbooks.Open(_s.expandpath(sfile))
ExcelSheet es.ws=book.Worksheets.Item(sheet)
es.ws.Range("m
").Delete
es.ws.Range("k:k").Delete
es.ws.Range("c:e").Delete
es.ws.Range("a:a").Delete
str editFile ="Edit"
str directory ="$desktop$/Excel/"
directory.from(editFile ".xls") ;; NOT WORKING Original file is "$desktop$\Abc.xls"
es.ws.SaveAs(directory) ;; I want Edit copy in $desktop$/Excel/Edit.xls" Folder
;;Saves the Excel sheet
book.Save
;;Closes the Excel
book.Close
str sheet="Sheet1"
;;Works the Magic...
Excel.Application app._create
Excel.Workbook book=app.Workbooks.Open(_s.expandpath(sfile))
ExcelSheet es.ws=book.Worksheets.Item(sheet)
es.ws.Range("m
").Deletees.ws.Range("k:k").Delete
es.ws.Range("c:e").Delete
es.ws.Range("a:a").Delete
str editFile ="Edit"
str directory ="$desktop$/Excel/"
directory.from(editFile ".xls") ;; NOT WORKING Original file is "$desktop$\Abc.xls"
es.ws.SaveAs(directory) ;; I want Edit copy in $desktop$/Excel/Edit.xls" Folder
;;Saves the Excel sheet
book.Save
;;Closes the Excel
book.Close
