Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application(); if (xlApp == null) { return false; } int FormatNum;//保存excel文件的格式 string Version;//excel版本号 Version = xlApp.Version;//获取你使用的excel 的版本号 if (Convert.To…
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.…