![]() |
|
#6
|
|||
|
|||
|
Hi Guessed,
Splitting the lines with vbLf fixed it. No more <CR>, no more hanging "0". Code:
lines = Split(Input$(LOF(hf), #hf), vbLf) ![]() Code:
Sub DCS_Get_Properties(sFN As String)
' Load core content using data txt file
Dim hf As Integer: hf = FreeFile
Dim oD As Object, PropLang As String, PropCat As String, PropNoSymbol As String, _
bool As Boolean, sFE As String, dc(60, 8) As String, _
i As Integer, lines() As String, tmp2() As String
Open sFN For Input As #hf
lines = Split(Input$(LOF(hf), #hf), vbLf)
Close #hf
For i = 0 To UBound(lines)
If (Trim(lines(i))) <> "" Then
Debug.Print "line " & lines(i)
tmp2 = Split(lines(i), " ++ ")
dc(i, 0) = tmp2(0) ' Table no
dc(i, 1) = tmp2(1) ' Row no
dc(i, 2) = tmp2(2) ' Cell no
dc(i, 3) = tmp2(3) ' Data Type
dc(i, 4) = tmp2(4) ' Content type
dc(i, 5) = tmp2(5) ' Cell style
dc(i, 6) = tmp2(6) ' Cell content
End If
Next
For i = 0 To UBound(lines)
Debug.Print "CONTENT - " & dc(i, 6)
If dc(i, 3) = "Prop" Then
If dc(i, 4) = "PropLang" Then
PropLang = dc(i, 6)
Call WriteProp("Prop-Language", PropLang)
ElseIf dc(i, 4) = "PropCat" Then
PropCat = dc(i, 6)
Call WriteProp("Prop-Category", PropCat)
ElseIf dc(i, 4) = "PropNoSymbol" Then
PropNoSymbol = dc(i, 6)
Call WriteProp("Prop-NoSymbol", PropNoSymbol)
Else
End If
Else
End If
Next
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| The “spelling and grammar” check fails to work as the number of words in the file exceeds a certain | Jamal NUMAN | Word | 3 | 09-24-2019 10:45 AM |
Need plugin for reading+converting *.pdf file into *.doc
|
pstein | Word | 1 | 05-24-2015 07:05 AM |
| Reading pane on TOP? | hehunt | Outlook | 0 | 04-10-2014 06:34 AM |
How to save a PPT file in 'Reading View' to be opened always in 'Reading View'
|
ItzVickey | PowerPoint | 2 | 08-08-2012 09:23 AM |
Word Basic 2003 to Word Basic 2007 Incompatibility
|
Mark1110 | Word VBA | 1 | 12-29-2010 11:04 PM |