WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

OLE with Excel
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Setting Proper Case in Range of Cells


xlsfile = "C:\test.xls"

;	Start excel here
objXLS = objectopen("Excel.Application")
objXLS.visible = @true
objWBK = objXLS.Workbooks
objWBK.open (xlsfile)

objActWBK = objXLS.activeworkbook
objActSheet = objActWBK.activesheet
objRange = objActSheet.Range("A2:C11")
ForEach objCell in objRange
		value = ObjCell.Value
		If oXL.WorkSheetFunction.IsText(objCell)
			ObjCell.Value = objXLS.WorksheetFunction.Proper(value)
	 endif
	 objCell = 0
Next

Next
objXLS.quit
objRange = 0
objActSheet = 0
objActWBK = 0
objWBK = 0
objXLS = 0



Article ID:   W16625
File Created: 2005:02:18:12:21:40
Last Updated: 2005:02:18:12:21:40