+ Reply to Thread
Results 1 to 5 of 5

A macro to produce a .dat file from a column on a spreadsheet?

  1. #1
    Forum Contributor
    Join Date
    05-02-2017
    Location
    NoVa, United States
    MS-Off Ver
    Microsoft 365
    Posts
    154

    A macro to produce a .dat file from a column on a spreadsheet?

    Okay so I'm curious if it's possible to create a dat file from a column on a spreadsheet?

    I've attached a spreadsheet with two tabs. I intend to copy and paste information on the Drop_Data tab. That will populate columns C and E (and then consequently column F) on the Use tab. The rest of the columns on the Use tab will be filled out through copy and paste.

    Anyway, on the Use tab, I want to know if the I can take the data in column F and convert it (through a macro) to a .dat file to my desktop.

    Is this possible?
    Attached Files Attached Files

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: A macro to produce a .dat file from a column on a spreadsheet?

    Of course, but for what? There isn't a standard format for dat files, so if you're wanting to use it in another application, you'll need to know the structure

  3. #3
    Forum Contributor
    Join Date
    05-02-2017
    Location
    NoVa, United States
    MS-Off Ver
    Microsoft 365
    Posts
    154

    Re: A macro to produce a .dat file from a column on a spreadsheet?

    Quote Originally Posted by Kyle123 View Post
    Of course, but for what? There isn't a standard format for dat files, so if you're wanting to use it in another application, you'll need to know the structure
    Ultimately it's going to be compressed and then uploaded into a system. I'm not terribly familiar with .dat files so I can't speak to the structure.

    The process I'm doing now is to open a notepad, input the data:
    Stuff|Things|2023/03/19|N|ABC-123
    Stuff|Things|2023/03/19|N|ABC-234
    Stuff|Things|2023/03/19|N|DEF-482
    Stuff|Things|2023/03/19|N|DEF-500
    Stuff|Things|2023/03/19|N|FEG-756

    and save it as a .dat file (then compressing it).

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: A macro to produce a .dat file from a column on a spreadsheet?

    This does basically what you're doing, it'll save the file to your desktop

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    05-02-2017
    Location
    NoVa, United States
    MS-Off Ver
    Microsoft 365
    Posts
    154

    Re: A macro to produce a .dat file from a column on a spreadsheet?

    That works! Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro that will produce 2 output csv file based on source
    By reggiesonline in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-24-2019, 09:19 PM
  2. Replies: 3
    Last Post: 05-23-2019, 02:52 AM
  3. Produce Hierarchy from spreadsheet
    By lemonap618 in forum Excel General
    Replies: 1
    Last Post: 10-18-2018, 03:26 AM
  4. Macro to Map data columns in two different excel files and produce data in third file
    By promaxbusiness in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 12-15-2015, 01:40 AM
  5. Macro formula to match two columns and Produce result in fourth column.
    By rishi1983 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-03-2012, 08:50 PM
  6. Will Excel produce invoices from a spreadsheet?
    By Anne Troy in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-06-2005, 05:05 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