Syl21 Posted August 19, 2009 Share Posted August 19, 2009 (edited) Hello everybody... I'have a problem about merged cells i'm using this "#include <ExcelCOM_UDF.au3>" I can merge or unmerge cells but i don't want that I just want know how many collums my merged cell take??? can you help me please??? do you know how to create a include fonction??? thanks in advance... Edited August 19, 2009 by Syl21 Link to comment Share on other sites More sharing options...
Syl21 Posted August 19, 2009 Author Share Posted August 19, 2009 I have create a function... If someone want to better it and had it to ExcelCOM_UDF.au3, it's a pleasure for me... Func _ExcelIsThisCellMerged($oExcel, $RowStart, $ColStart) If NOT IsObj($oExcel) Then Return SetError(1) If NOT StringRegExp($RowStart, "[A-Z,a-z]", 0) Then If $ColStart < 1 Then Return SetError(2) $Merged = $oExcel.Cells($RowStart, $ColStart).MergeCells EndIf if $Merged < 0 then $Merged = 1 EndIf Return $Merged EndFunc ;==>_ExcelCellMerge Enjoy Link to comment Share on other sites More sharing options...
zfisherdrums Posted August 21, 2009 Share Posted August 21, 2009 Dim $oXl = ObjGet( "", "Excel.Application" ) Func _ExcelIsCellMerged( $oExcel, $sAddress ) ; beware: sending only rc coordinates assumes the Activesheet context. ; To ensure that the correct sheet is assumed, pass in the sheet name: ; ; example: $sAddress = "Sheet1!A1" Return $oExcel.Application.Range($sAddress).MergeArea.Columns.Count > 1 EndFunc Dim $result = _ExcelIsCellMerged( $oXl, "Sheet1!A1" ) ConsoleWrite( $result & @CRLF) Identify .NET controls by their design time namesLazyReader© could have read all this for you. Unit Testing for AutoItFolder WatcherWord Doc ComparisonThis here blog... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now