Results 1 to 2 of 2

Thread: Default Import Multiple Arabic .TXT Files to Excel One Per Row???

  1. #1

    Default Import Multiple Arabic .TXT Files to Excel One Per Row???



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi All,

    First off I'd like to say it's awesome joining such a knowledgeable board.

    I'm doing some basic Arabic text manipulation, but before I begin I have to input all the text files in a sub-folder on my OSX desktop to a single column in Excel, one file per cell in the column (i.e. .txt1 = A1; .txt2 = A2; .txt3 = A3).

    Before I started I had to convert the document encoding from UTF8, to UTF16 so Arabic characters were properly rendered (I used UTFCast Pro -awesome for these kind of batch encoding conversions).

    I have essentially zero VBA knowledge. I've got a recorded macro, but I need one that will loop through the entire sub-directory and print each txt file to each cell in column A:

    Code:
    Sub txtimp()
    '
    ' txtimp Macro
    '
    
    '
        With ActiveSheet.QueryTables.Add(Connection:= _
            "TEXT;Macintosh HD:Users:joa:Desktop:MuradUTF16:murad (Converted) (2):muradout0037.txt" _
            , Destination:=Range("F1"))
            .Name = "muradout0037_3"
            .FieldNames = True
            .RowNumbers = False
            .FillAdjacentFormulas = False
            .RefreshOnFileOpen = False
            .BackgroundQuery = True
            .RefreshStyle = xlInsertDeleteCells
            .SavePassword = False
            .SaveData = True
            .AdjustColumnWidth = True
            .TextFilePromptOnRefresh = False
            .TextFilePlatform = xlMacintosh
            .TextFileStartRow = 1
            .TextFileParseType = xlDelimited
            .TextFileTextQualifier = xlTextQualifierDoubleQuote
            .TextFileConsecutiveDelimiter = False
            .TextFileTabDelimiter = True
            .TextFileSemicolonDelimiter = False
            .TextFileCommaDelimiter = False
            .TextFileSpaceDelimiter = False
            .TextFileColumnDataTypes = Array(1)
            .Refresh BackgroundQuery:=False
            .UseListObject = False
        End With
    End Sub
    Any suggestions??? I'm at an impasse and would greatly, greatly appreciate any assistance. M0037 is the first file in the folder, which proceed in ascending numeric order.

    Thanks so much!!!

  2. #2

    Vba_query

    Hi Ken,

    How to add only red colored time in last cell of every column through VBA or Excel both.


    Thanks & Regards
    VJ SINGH


    Copy of Red color count coloumn wise.xlsm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •