//---WPS----- using EtApp = ET; using System.Reflection; using System.Runtime.InteropServices; using System.Configuration; //--Excel-------- using EtAppExcel = Microsoft.Office.Interop.Excel; namespace LensMaterialPowerCenter.Dorm { public partia
Sub W() ' MsgBox "行数:" & Selection.Rows.Count Dim rows_count As Integer Dim rows_id As Integer Dim column_count As Integer column_count = Selection.Columns.Count '获取选择区域的列数 'MsgBox column_count '打印列数 rows_id = ActiveCell.
Sub 抽离数字() Dim hang Range("h1").Select Columns("E:F").Select Selection.Clear Range("c3:c190").Select Selection.Replace What:="(", Replacement:="(", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False,
Sub 分列() '以空格为分隔符,连续空格只算1个.对所选中的单元格进行处理 Dim m As Range, tmpStr As String, s As String Dim x As Integer, y As Integer, subStr As String If MsgBox("确定要分列处理吗?请确定分列的数据会覆盖它后面的单元格!", _ vbYesNoCancel + vbQuestion) <> vbYes Then Exit Sub For Each
最近在学习 xlwings,参考学习的网址:https://www.jianshu.com/p/b534e0d465f7 写得很棒,学到了很多. 在新建sheet表单, 发现一个问题. import xlwings as xw def creat_sheet(path, sheet=None, before=None): ''' :param path: excel file path :param sheet: the name of which creating the sheet, cou