Skip to content

Instantly share code, notes, and snippets.

@polarnik
Created December 29, 2014 06:33
Show Gist options
  • Save polarnik/d0201ccbc67a1eb73e80 to your computer and use it in GitHub Desktop.
Save polarnik/d0201ccbc67a1eb73e80 to your computer and use it in GitHub Desktop.
Загрузка результатов тестов SoapUI из текстового файла в книгу Excel при открытии книги
Private Sub Workbook_Open()
sOpenFile = Application.GetOpenFilename("Files soapUI (*.txt), *.txt")
With ActiveSheet.QueryTables.Add(Connection:="TEXT;" & sOpenFile, Destination:=Range("$A$1"))
.Name = "soapUI Data"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileOtherDelimiter = ","
.TextFileColumnDataTypes = Array(1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=True
End With
End Sub
'Sample soapUI file content:
'ThreadCount,min,max,avg,last,cnt,tps,bytes,bps,err,sum
'1,24194,24194,24194,24194,1,0,3357,134,0,0
'1,836,24194,12515,836,2,0,6714,253,0,0
'1,836,24194,8991,1944,3,0,10071,345,0,0
'1,836,24194,6983,960,4,0,13428,435,0,0
'1,836,24194,5963,1885,5,0,16785,501,0,0
'1,733,24194,5092,733,6,0,20142,575,0,0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment