Results 1 to 5 of 5

Thread: Csv *Resolved*

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member GingerNut's Avatar
    Join Date
    May 2002
    Location
    Are those my feet?
    Posts
    372

    Csv *Resolved*

    Hey guys, need a little help here. I'm writing a small prog that reads a text file and outputs the necessary data to a csv file. I got it to sort of work:

    VB Code:
    1. Dim NumberofTemps As Integer
    2. Dim TempDate As String
    3. Dim Temperature As Integer
    4. Dim TempNumber As Integer
    5. Open cdlFiles.FileName For Input As #1
    6. Open App.Path + "\temp.csv" For Output As #2
    7. Input #1, NumberofTemps
    8. For TempNumber = 1 To NumberofTemps
    9.     Input #1, TempDate, Temperature
    10.     Write #2, TempNumber, Temperature
    11. Next TempNumber
    12. Close 1
    13. Close 2

    Each text file can have up to 31 lines like the following:
    01/08/02 HighTemp = ,19
    It then outputs to the csv file:
    1,19

    But I can only get it to do the first line.
    Last edited by GingerNut; Nov 4th, 2002 at 09:40 AM.
    How is it one careless match can start a forest fire, but it takes a whole box to start a campfire?

    Global Freelancers | Web Traffic Analyser

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width