![]() |
|
|||||||
| ASP & VBScript Forum Need help from a webmaster with ASP or VBScript, you may ask in this forum? |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I have a CSV file that I'm importing into Word in a report format. I have everything working and it imports all the columns, but I'm coming up with some strange characters in the following cases:
CSV file = doen't Import = doesn’t CSV file = ... Import = … Can someone help me out with this, as I have hit a wall and don't know where to go from here.Below is the area that I think is causing me the problem. __________________ Public Function ParseParams(RecordString As String) Dim sTmp() As String Dim tmpStr As String Dim I As Integer tmpStr = RecordString tmpStr = Replace(tmpStr, """""", Chr(4)) Do While ((InStr(1, tmpStr, """,") > 0) Or (InStr(1, tmpStr, ",""") > 0)) tmpStr = Replace(tmpStr, """,", Chr(1) + ",") tmpStr = Replace(tmpStr, ",""", "," + Chr(1)) Loop sTmp = Split(tmpStr, Chr(1)) tmpStr = "" For I = 0 To UBound(sTmp) If (I Mod 2) = 0 Then tmpStr = tmpStr & Replace(sTmp(I), ",", Chr(2)) Else tmpStr = tmpStr & sTmp(I) End If Next I tmpStr = Replace(tmpStr, Chr(4), """") tmpStr = Replace(tmpStr, "?", """") sTmp = Split(tmpStr, Chr(2)) ParseParams = sTmp End Function __________________ Thanks, Michael |
|
This ad is part of our Revenue Sharing program |