+ Reply to Thread
Results 1 to 8 of 8

How to save as .dat file?

  1. #1
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    How to save as .dat file?

    Hello!

    I am trying to save a excelsheet as a .dat file, but when I do this the macro adds "" in front and at the end of each line. Anyone who knows why?

    Please Login or Register  to view this content.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,330

    Re: How to save as .dat file?

    Try some of the other FileFormats on the list from the link below.
    I'd try FileFormat:= xlTextMSDOS
    http://msdn.microsoft.com/en-us/libr...ileformat.aspx

  3. #3
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: How to save as .dat file?

    didn't help. the problem is that whatever fileformat I am saving it into it adds "", but if I copy into notepad and save as dat it doesn't.

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,985

    Re: How to save as .dat file?

    What format is your .dat file supposed to be?
    Everyone who confuses correlation and causation ends up dead.

  5. #5
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: How to save as .dat file?

    It is supposed to be as they are in the excelsheet, without anything added to it..? Not delimited or anything. Just the spreadsheet.

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,985

    Re: How to save as .dat file?

    It must be delimited, otherwise your data file is either just an .xls with a different name, or it's gibberish (unless all rows in each column have the same number of characters).

  7. #7
    Forum Contributor
    Join Date
    03-09-2010
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    173

    Re: How to save as .dat file?

    I want it to be as if I copy the spreadsheet and paste into a notepad text, was that anymore clearifying?

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,985

    Re: How to save as .dat file?

    So tab delimited then.
    Using your code works fine for me - no "" added anywhere.

+ 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