+ Reply to Thread
Results 1 to 2 of 2

Exporting from Excel to a Text file

  1. #1
    Registered User
    Join Date
    02-10-2005
    Posts
    2

    Exporting from Excel to a Text file

    I have a value in an Excel cell, which needs to be expressed as a percentage for presentation purposes.

    However I also need to export this value into a text file.

    However, when I export the contents it appears in the text file as scientific notation.

    I need to express the contents of the Excel cell in the Text File as a deciaml to 8 decimal places (no scientific notation).

    ....

  2. #2
    Registered User
    Join Date
    02-10-2005
    Posts
    2
    by the way... the code is...

    save_file = Range("B13").Value
    RawDate = Range("B3").Value
    return_bench = Range("I18").Value

    RawYear = Year(RawDate)
    RawMonth = Month(RawDate)
    RawDay = Day(RawDate)

    If (RawDay < 10) Then
    RawDay = "0" & RawDay
    End If

    If (RawMonth < 10) Then
    RawMonth = "0" & RawMonth
    End If

    convert_date = RawYear & RawMonth & RawDay

    Set fs = CreateObject("Scripting.FileSystemObject")
    Set syl = fs.CreateTextFile(save_file, True)

    syl.write ("MIH,XXXXXXX," & convert_date & "," & convert_date & ",,,,,,,,")
    syl.write (vbCrLf)

    syl.write ("MIV,XXXXXXX,XXXXXXX,")
    syl.write (convert_date & "," & convert_date & ",,,")

    syl.write (",,1," & return_bench & "," & return_bench)
    syl.write (vbCrLf)

    syl.Close

    exitsub:
    Exit Sub

    End Sub

    and the relevent cell is "I18"

+ 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