Modify

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#3784 closed Feature Request (Rejected)

StringSplit2D

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:

Description

Func StringSplit2D($sMatches = "Hola2-5-50-50-100-100|Hola-6-200-200-100-100", $sDelim_Item = "-", $sDelim_Row = "|")

Local $iValDim_1, $iValDim_2 = 0, $iColCount
Local $aSplit_1 = StringSplit($sMatches, $sDelim_Row, $STR_NOCOUNT + $STR_ENTIRESPLIT)
$iValDim_1 = UBound($aSplit_1, $UBOUND_ROWS)
Local $aTmp[$iValDim_1][0], $aSplit_2
For $i = 0 To $iValDim_1 - 1

$aSplit_2 = StringSplit($aSplit_1[$i], $sDelim_Item, $STR_NOCOUNT + $STR_ENTIRESPLIT)
$iColCount = UBound($aSplit_2)
If $iColCount > $iValDim_2 Then

$iValDim_2 = $iColCount
ReDim $aTmp[$iValDim_1][$iValDim_2]

EndIf
For $j = 0 To $iColCount - 1

$aTmp[$i][$j] = $aSplit_2[$j]

Next

Next
Return $aTmp

EndFunc

Attachments (0)

Change History (4)

comment:1 by TicketCleanup, 5 years ago

Version: 3.3.14.0

Automatic ticket cleanup.

comment:2 by Jos, 5 years ago

Resolution: Rejected
Status: newclosed

The Examples thread is the right place for this moment. When there is a lot of interest we can consider the inclusion.

Jos

comment:3 by anonymous, 4 years ago

Hi ,
Global $g_sDelimRow = @LF ; => for Activesheet Paste function from ClipBoard
Global $g_sDelimCol = @TAB ; => for Activesheet Paste function from ClipBoard

;_Excel_RangeWrite( @@@source workbook@@@, @@@target workbook.sheet@@@, StringSplit2D(ClipGet(), $g_sDelimCol, $g_sDelimRow ), @@@target cell@@@ ) ;func $oWorkbook.Activesheet.Paste

_Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, StringSplit2D(ClipGet(), $g_sDelimCol, $g_sDelimRow ), "A2") ;func $oWorkbook.Activesheet.Paste

Can be use as Drop in replace for Activesheet.Paste from Clipboard for Excel 365

Kay

comment:4 by Jos, 4 years ago

This is a closed feature request/proposal and don't see how your post has anything to do with it!

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.