Created
March 14, 2016 17:52
-
-
Save cmosguy/c71fcd7e09ed33d738f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "Loading BHAB Parser" | |
package require csv | |
package require struct::matrix | |
catch { | |
#doing a lot of reloading on the data matrix | |
#need to delete the data command before issuing the | |
#struct command again | |
rename data {} | |
} | |
::struct::matrix data | |
proc parseB5evCsv {csvFile} { | |
set chan [open $csvFile r] | |
csv::read2matrix $chan data , auto | |
close $chan | |
set rows [data rows] | |
for {set row 0} {$row < $rows} {incr row} { | |
if {$row == 0} { | |
set title [lindex [data get row $row] 0] | |
puts "Title: $title" | |
} | |
} | |
return [list $title] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment