|
Sub 副本仅存数据和格式()
Dim bs%, nm, snum%
Application.ScreenUpdating = False
snum = Application.SheetsInNewWorkbook
bs = ThisWorkbook.Sheets.Count - 1
nm = ThisWorkbook.Name
Application.SheetsInNewWorkbook = bs
With Workbooks.Add
For i = 1 To bs
With .Sheets(i)
ThisWorkbook.Sheets(i).UsedRange.Copy
With .Range("a1")
.PasteSpecial xlPasteValues
.PasteSpecial xlPasteColumnWidths
.Range("a1").PasteSpecial xlPasteFormats
' 怎样去掉条件格式,根据表的实际自己加代码改一下吧。
End With
.Name = ThisWorkbook.Sheets(i).Name
End With
Next
.Close True, ThisWorkbook.Path & "\" & "一条流"
End With
Application.SheetsInNewWorkbook = snum
Application.ScreenUpdating = True
End Sub
如上代码是从网上复制的,现在共有5个表格,在每个表格复制后的这固定三列要转换为数字格式,我使用的分列实现的批量转换。
[C:C].TextToColumns Other:=True, OtherChar:="|"
[D:D].TextToColumns Other:=True, OtherChar:="|"
[J:J].TextToColumns Other:=True, OtherChar:="|"
如上三列,C、D、J列 需要转换给数字各式。 现在要实现将5个表的固定三列转换为数字格式。请个
|
|