- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I am trying to write code to collect standard info from a csv file to be added to iProperties.
Following is the code I have so far.
Dim Separators() As Char = {"\"c} Words = ThisDoc.Path.Split(Separators) FilName = "C:\Vault\Designs\" & Words(3) & "\Spec_Sheet.csv"
Dim ReadCSV As New System.IO.StreamReader(FilName) Dim WordSets As New ArrayList()
Do While ReadCSV.Peek <> -1 WordSets.Add(ReadCSV.ReadLine.Split(",")) Loop
i = 0 SName = iProperties.Value("Project", "Stock Number")
For Each wrd In WordSets If WordSets.item(i)(0) = SName Then iProperties.Value("Project", "Description") = WordSets.item(i)(1) iProperties.Value("Custom", "Finish") = WordSets.item(i)(2) End If i += 1 Next
The only problem I have is that this line crashes. I am not competent enough to understand why. Can anyone help me
Dim ReadCSV As New System.IO.StreamReader(FilName)
Anyone......
Solved! Go to Solution.