Results 1 to 5 of 5

Excel macro - save to files from cells problem

Threaded View

1universe Excel macro - save to files... 04-01-2018, 04:04 PM
bakerman2 Re: Excel macro - save to... 04-01-2018, 08:08 PM
1universe Re: Excel macro - save to... 04-01-2018, 09:14 PM
alansidman Re: Excel macro - save to... 04-01-2018, 08:13 PM
bakerman2 Re: Excel macro - save to... 04-01-2018, 10:29 PM
  1. #1
    Registered User
    Join Date
    04-01-2018
    Location
    Lima
    MS-Off Ver
    2016
    Posts
    2

    Excel macro - save to files from cells problem

    Hi friends
    If anybody can help about next problem
    I found next macro on net
    and working very good for outputting Excel rows to a series of text files

    Getting name of file from first row and save content of cell from second row to a file (csv or text)

    BUT problem is how output (export) from cells to files with UTF-8 format?

    Any help possible?

    Here is macro
    **************************
    Sub DataDump()
    
        Dim X
        Dim lngRow As Long
        Dim StrFolder As String
    
        StrFolder = "C:\temp"
        X = Range([a1], Cells(Rows.Count, 2).End(xlUp))
        For lngRow = 1 To UBound(X)
        Open StrFolder & "\" & X(lngRow, 1) & ".txt" For Output As #1
        Write #1, X(lngRow, 2)
        Close #1
        Next
        End Sub
    *****************************
    Last edited by alansidman; 04-01-2018 at 08:13 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Save/Closed only macro related files and leave unrelated files open in excel?
    By rdowney79 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-12-2013, 04:17 PM
  2. [SOLVED] Loop through multiple files, run macro, then save as Excel workbook in a different folder
    By Peter Kallio in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 08-26-2013, 11:42 PM
  3. Replies: 1
    Last Post: 07-26-2013, 11:05 PM
  4. Replies: 2
    Last Post: 05-06-2013, 06:41 PM
  5. Excel Macro to save several text files, based on the contents of two cells.
    By chronologie2 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-29-2012, 11:31 AM
  6. Macro Needed to Loop, Save, and Name Excel Files as PDFs
    By ahkarchem in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-11-2012, 10:46 AM
  7. Macro to Open, Save and Close Excel Files
    By az! in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-07-2011, 04:19 AM
  8. Replies: 0
    Last Post: 09-16-2009, 05:11 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1