Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Just one tip for anyone who wants to import Excel file into IPOCC Campaign using Dialer 2

Status
Not open for further replies.

hungnam78

IS-IT--Management
Mar 17, 2016
1
VN
thread1831-1765238
Hey Guys,
Just reference to the above closed thread. I've tried to post the answer there but the topic was closed already.
My solution to importing the Excel file into the Dialer in IPOCC is need to use Microsoft Access, since Access is more powerful in generating the output file in .CSV.
If you tried to export the content from Excel itself into CSV file, then you are not able to import this .CSV file into the IPOCC, because Excel already adjust the .CSV format itself (actually it adds double quote "" wrongly thus IPOCC does not understand the imported file) then it is not suited for IPOCC. The best is to use MS Access, with the correct .CSV file format.

Just my 2cents.

Thanks everyone.
Nam
 
I actually made a macro enabled excel sheet that specifically outputs in the correct format. I gave this to the customer and they don't seem to have any issues. Please see the attached file. If you are nervous opening a macro excel sheet from a stranger below is the macro I used in text form so you can implement it yourself.
Code:
Sub CSVFile()
'updateby
    Dim xRg As Range
    Dim xRg2 As Range
    Dim xRow As Range
    Dim xCell As Range
    Dim xStr As String
    Dim xSep As String
    Dim xTxt As String
    Dim xName As Variant
    Dim xName2 As Variant
    On Error Resume Next
    ThisWorkbook.Sheets("dialer_import.csv").Activate
    If ActiveWindow.RangeSelection.Count > 1 Then
      xTxt = ActiveWindow.RangeSelection.AddressLocal
    Else
      xTxt = ActiveSheet.UsedRange.AddressLocal
    End If
    Set xRg = ActiveSheet.UsedRange
    If xRg Is Nothing Then Exit Sub
    xName = CurDir & Application.PathSeparator & "dialer_import.csv"
    xName2 = CurDir & Application.PathSeparator & "dialer_import.txt"
    xSep = Application.International(xlListSeparator)
    Open xName For Output As #1
    For Each xRow In xRg.Rows
        xStr = ""
        For Each xCell In xRow.Cells
            xStr = xStr & """" & xCell.Value & """" & xSep
        Next
        While Right(xStr, 1) = xSep
            xStr = Left(xStr, Len(xStr) - 1)
        Wend
        Print #1, xStr
    Next
    Close #1
    ThisWorkbook.Sheets("dialer_import.txt").Activate
    Set xRg2 = ActiveSheet.Range("A1:A8")
    Open xName2 For Output As #2
    For Each xRow In xRg2.Rows
        xStr = ""
        For Each xCell In xRow.Cells
            xStr = xStr & xCell.Value & xSep
        Next
        While Right(xStr, 1) = xSep
            xStr = Left(xStr, Len(xStr) - 1)
        Wend
        Print #2, xStr
    Next
    Close #2
    ThisWorkbook.Sheets("Start").Activate
    If Err = 0 Then MsgBox "The file has saved to: " & xName & " & " & xName2, vbInformation, "Dialer Import"
End Sub
 
 http://files.engineering.com/getfile.aspx?folder=d7db4f9c-474c-4d73-869b-a51d14555a9a&file=dialer_import.xlsm
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top