Modify

Opened 4 years ago

Closed 4 years ago

Last modified 2 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 Changed 4 years ago by TicketCleanup

  • Version 3.3.14.0 deleted

Automatic ticket cleanup.

comment:2 Changed 4 years ago by Jos

  • Resolution set to Rejected
  • Status changed from new to closed

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 Changed 2 years ago by anonymous

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 Changed 2 years ago by Jos

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

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.