;分列功能热键 ;本实例是处理用"-"来分隔的数据 /* 一列 abc-124 abc-125 abc-126 abc-127 abc-128 */ /* 变成两列 abc 124 abc 125 abc 126 abc 127 abc 128 */ ;sunwind ;2014年12月1日 ^j:: { x1 := ComObjActive("Excel.Application") x1.ActiveCell.EntireColumn.select xlDelimited:=1 xlDoubleQuote:=1 Destination:=x1.Range("k1") ;这里应该改成目的地址《------ DataType:=xlDelimited TextQualifier:=xlDoubleQuote ConsecutiveDelimiter:=0 ;False Tab:=0 ;用制表符分列则置1 Semicolon:=0 ;用分号分列则置1 Comma:=0 ;用逗号分列则置1 Space:=0 ;用空格分列则置1 Other:=1 ;如不是分号逗号空格 那么这个要设置成1,并添加下面符号项 OtherChar :="-" ;分列用哪个自定义符号 《------ try { x1.Selection.TextToColumns(Destination, DataType, TextQualifier, ConsecutiveDelimiter, Tab, Semicolon, Comma, Space, Other, OtherChar) } catch e { Return } Return }