Hi, I am currently trying to get a old VB macro converted to ignition code. Does anyone have any good suggestions?
What it supposed to do:
- Take a txt file and import the file into excel using vba. (Code is below)
What i would like to do:
- Import it via a script around 3 am.
- I would probably import it to ignition tags on the gateway so that it can be used plantwide
Notes:
I would like to use the csv or any other plugin thats compatable with jython . The text file is also double spaced for its delimiter
With Sheet3.QueryTables.Add(Connection:="TEXT;" & SDriveDirectory & "rodfile_m0008.txt", Destination:=Sheet3.[A1])
' .Name = "OB"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With