Closed Thread
Results 1 to 2 of 2

Need to generate text file using macros.

  1. #1
    macromaniac
    Guest

    Exclamation Need to generate text file using macros.

    Hello evryone,

    I am building an application where in i need some help to develop macros!

    I am new to VB macros and I am clueless to how to even proceed with the programming part.
    I have tried a lot of forums online and I couldnt get what I want.
    I am new to this forum too.

    I will be grateful if some one can give me any suggestions on inputs on my requirements.
    This is solely for my work related stuff. I am on new job and cannot even say a NO!

    I have attached my macro at end of the post and also the sample Excel file which I am trying to work on. I am also attaching the picture file of desired output deck (just to be more clear about the output I need)
    Kindly have a look at them.

    My Problem:

    I have an excel sheet with approx 1200 columns-using Excel 2007 (columns: A to APS).
    The headers for the coulmns are specified in the second row. I need a program which can read the
    entire file like all the contents(row-wise) and put it in a formatted way to a text file. The formatting should be :
    1>Each row in the text file should start with a "+" sign and the values read from the excel should be
    formatted and placed in 8 characters long. I do not want the header data here!!


    In my data in Excel sheet I also have a challenge of comparing few headers feilds.
    To be precise,
    •Fields/Columns in the Excel data are fixed set.
    •I have a feild called "drive type". If the drive type is CDD then the data in the row should be read else can be skipped.
    •The content in the field named Description in the Excel sheet is added as a comment in the text file generated so should start with '.
    •I have some nos in the headers, If the value for that nos is blank in the rows then they should be skipped.
    •The first occurrence of the data is considered as the entry point. (That should be also mentioned in text file!!)
    •Values are valid if it is x or x.5 (where x is a whole no. Rest all the values which do not equal this are ignored)
    •A count of how many values are obtained is kept for each DID and Date ID and is outputted in the text file.
    I need the text file to be generated though excel itself. We can add the button or something!

    I am working on customizing the ribbon. If you can also provide me some inputs on that I shall appreciate it. ( I know about XML and Custom UI for making these-through all forums)


    I have tried to write a small macro which is reading columns and also saving them in text file. I am attching that macro here:
    But defnitely not doing a great job!!

    MY macro:

    Please Login or Register  to view this content.

    I look forward and really appreciate your help.
    Thanks a lot,
    Macromaniac

    <<Attachments goes here>>

    Data.xlsx

    output_desired.JPG
    Last edited by macromaniac; 05-26-2011 at 12:45 PM. Reason: attachments

  2. #2
    macromaniac
    Guest

    Re: Need to generate text file using macros.

    Can t you help me close thsi thread and help me put it in Excel Programming! help me please I even sent you a message.
    Last edited by macromaniac; 05-26-2011 at 01:04 PM.

Closed Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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