Set DataRng = Range("A1:D" & zuidazhi)
Set ptcache = ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:=DataRng)
Sheets.Add
Sheets("Sheet1").Select
Set pt = ptcache.CreatePivotTable(tabledestination:=Sheets("Sheet1").Range("b1"), TableName:="pivottable1")
With ActiveSheet.PivotTables("pivottable1").PivotFields("采樣時間")
.Orientation = xlRowField
.Position = 1
End With