+ Reply to Thread
Results 1 to 2 of 2

Create Flat File from Macro

  1. #1
    Registered User
    Join Date
    08-04-2009
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Create Flat File from Macro

    I need help writing a macro that will read data from excel and create/write to a flat file. My excel file has 7 columns. I need all the non-blank rows in the excel file (different data ranges for different files) read and write the data to a flat file while also included hardcoded text in the output. For example: If my 5 columns have A, B, C, D, E as values in the first row (ignore column headers). Values are in A2, B2, C2, etc. I want something like this outputted.
    <definition_id = “A” temp1 = “B” temp2=”C” temp3 = “D”>
    <name>E</name>
    Everything outputted is “hard-coded” except where A,B,C,D, E are. Those are values from Excel and I need it outputted with the quotations. I need this for every non-blank row in excel. I also have line breaks in the values of A, B, C, D, E which I need removed. It shows up in Excel as:
    My name
    is John.

    Should show up as: My Name is John.
    Please help!!!

  2. #2
    Registered User
    Join Date
    06-26-2008
    Location
    CA
    Posts
    2

    Re: Create Flat File from Macro

    Correction: My excel file has 5 columns, NOT 7.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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