I'm trying to do some tweaks to an Traceability Excel output using DXL.
void groupRow (int startGroupLvl, stopGroupLvl) {
groupString = (startGroupLvl + 1) ":" stopGroupLvl ""
clear args
put (args, groupString)
oleGet (objSheet, "Range", args, objRange)
if (!null objRange) {
oleMethod (objRange, "Select")
oleMethod (objRange, "Group")
checkRes (oleGet (objRange, cPropertyBorders, objBorders))
checkRes (olePut (objBorders, cPropertyColorIndex, xlAutomatic))
}
}
Ben_Sharples - Thu Dec 03 10:47:06 EST 2009 |
Re: Setting Borders in Excel
If I understood you right, what you want to achieve is putting the border around the "outside" of a range, instead of every cell in a range. Selection.BorderAround xlContinuous, xlThin, xlColorIndexAutomatic, 0
|
Re: Setting Borders in Excel Mathias Mamsch - Sun Dec 06 14:11:20 EST 2009
If I understood you right, what you want to achieve is putting the border around the "outside" of a range, instead of every cell in a range. Selection.BorderAround xlContinuous, xlThin, xlColorIndexAutomatic, 0
The VBA side of things is fine. Just can't invoke in DXL. oleMethod (objRange, "BorderAround" xlContinuous, xlThin, xlColorIndexAutomatic, 0)
|
Re: Setting Borders in Excel Ben_Sharples - Mon Dec 07 05:00:38 EST 2009
The VBA side of things is fine. Just can't invoke in DXL. oleMethod (objRange, "BorderAround" xlContinuous, xlThin, xlColorIndexAutomatic, 0)
Hmm ... that should not 'compile' fine. OleMethod comes in 3 different flavors: string oleMethod (OleAutoObj obj, string funcName, OleAutoArgs arguments, char& var) string oleMethod (OleAutoObj obj, string funcName, OleAutoArgs arguments, bool& var) string oleMethod (OleAutoObj obj, string funcName, OleAutoArgs arguments, int& var) string oleMethod (OleAutoObj obj, string funcName, OleAutoArgs arguments, OleAutoObj& var) string oleMethod (OleAutoObj obj, string funcName, OleAutoArgs arguments, string& var)
string oleMethod (OleAutoObj obj, string funcName, OleAutoArgs arguments)
string oleMethod (OleAutoObj obj, string funcName)
OleAutoArgs arguments = create() olePut (arguments, 1) // xlContinuous olePut (arguments, 1) // xlThin olePut (arguments, -4105 ) // xlColorIndexAutomatic oleMethod (objRange, "BorderAround", arguments) delete arguments
|
Re: Setting Borders in Excel
When you are getting the "Borders" object, you can pass an argument set in the OleAutoArgs variable ('args' in this case) to get which border you want to set. clear args put(args,xlEdgeTop) // 8 checkRes (oleGet (objRange, cPropertyBorders,args, objBorders))
checkRes (olePut (objBorders, "LineStyle", xlContinuous)) // 1 checkRes (olePut (objBorders, "Weight", xlThick)) // 4
|
Re: Setting Borders in Excel Mathias Mamsch - Mon Dec 07 06:35:41 EST 2009
Hmm ... that should not 'compile' fine. OleMethod comes in 3 different flavors: string oleMethod (OleAutoObj obj, string funcName, OleAutoArgs arguments, char& var) string oleMethod (OleAutoObj obj, string funcName, OleAutoArgs arguments, bool& var) string oleMethod (OleAutoObj obj, string funcName, OleAutoArgs arguments, int& var) string oleMethod (OleAutoObj obj, string funcName, OleAutoArgs arguments, OleAutoObj& var) string oleMethod (OleAutoObj obj, string funcName, OleAutoArgs arguments, string& var)
string oleMethod (OleAutoObj obj, string funcName, OleAutoArgs arguments)
string oleMethod (OleAutoObj obj, string funcName)
OleAutoArgs arguments = create() olePut (arguments, 1) // xlContinuous olePut (arguments, 1) // xlThin olePut (arguments, -4105 ) // xlColorIndexAutomatic oleMethod (objRange, "BorderAround", arguments) delete arguments
|