Excel- Export specific columns to multiple text files vba -


my excel file looks this

new_filename    media_id    sighting_id frame   face_x  face_y  face_width 28069_00000.png 28069            15775     0    309.715   16.714    141 28069_00060.png 28069            15776     60   318       17      136.57 28069_00075.png 28069            15777     75   325.857   18        138.571 28069_00135.png 28069            15778     135  343.428   30.5757   134.1428 28069_00195.png 28069            15779     195  323.333   18      155.333 28069_00255.png 28069            15780     255  278.243   15.2857   138 28069_00315.png 28069            15781     315  284       18.8      137.85 

i extract values columns facex, facey, face width , face height , save extracted values in text file having value in new filename column name of text file.

i repeat same procedure 3000 rows.

so txt file 1 should have values of (2,c6) (2,c7) (2,c8) , should named (2,c1) , on rows. clear enough?

sub test()     dim r long     activesheet          r = 2         while .cells(r, 1).value <> ""             open .parent.path & "\" & left(.cells(r, 1).value, len(.cells(r, 1).value) - 4) & ".txt" output #1             print #1, .cells(r, 6).value & "," & .cells(r, 7).value & "," & .cells(r, 8).value             close #1             r = r + 1         loop      end end sub 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -