Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6982293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:16:08+00:00 2026-05-27T18:16:08+00:00

Hi below is the data sample for chart data which I read from URL

  • 0

Hi below is the data sample for chart data which I read from URL


ARRAY ‘ ‘ 3 8
Y
25 75 100 125 150 175 200 225
‘A’ 3 8 6 7 5 3 2 7
‘B’ 1 9 7 8 4 7 2 5
‘C’ 8 7 3 6 56 9 111 8

Now in this I want to save this data into a csv file as below

Time    A   B   c
25      3   1   8
75      8   9   7
100     6   7   3
125     7   8   9
150     5   4   56
175     3   7   9
200     2   2   111
225     7   5   8

Actually I have to first read the data into an array in which each element will contain one line of the data file, Now I will have to split the each element by space and store it in a two dimensional array, now for each ith index of each array I have to create a coma separated line then put “\n” at the end of line , and at last save this to a csv file .

I don’t know much about the syntax of vb-script and classic asp that’s why I am facing this problem . Please help me

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:16:08+00:00Added an answer on May 27, 2026 at 6:16 pm

    To get you started:

    Sub doReOrder(sFSpecI, sFSpecO, sCol1)
      Dim oTS    : Set oTS = goFS.OpenTextFile(sFSpecI)
      Dim sData  : sData   = oTS.ReadLine() ' ARRAY ' ' 3 8
      Dim aParts : aParts  = Split(sData, " ")
      Dim nCols  : nCols   = CByte(aParts(3)) ' Count vs UBound vs Data!
      Dim nRows  : nRows   = CByte(aParts(4))
      Dim nRows2 : nRows2  = nRows + 1
      oTS.SkipLine ' Y
      ' get table in one string, prepend col1 name, clean '
      sData  = "'" & sCol1 & "' " & Replace(oTS.ReadAll(), vbCrLf, " ")
      sData  = Trim(Replace(sData, "'", """"))
      ' get table in flat array
      aParts = Split(sData, " ")
      oTS.Close
      Set oTS = goFS.CreateTextFile(sFSpecO, True)
    ' WScript.Echo Join(aParts, "|")
      ReDim aData(nCols) ' hold one (new) row to prep for Join
      Dim nRow
      For nRow = 0 To nRows
          Dim nCol
          For nCol = 0 To nCols
              ' magic column hopping
              aData(nCol) = aParts(nRow + nCol * nRows2)
          Next
          oTS.WriteLine Join(aData, ",")
      Next
      oTS.Close
    End Sub
    

    Test:

      Dim sFSpecI : sFSpecI = "..\Data\f1.txt"
      Dim sFSpecO : sFSpecO = "..\Data\f1.csv"
      Dim sCol1   : sCol1   = "Time" ' dangerous - possibly reserved in SQL
      WScript.Echo goFS.OpenTextFile(sFSpecI).ReadAll()
      doReOrder sFSpecI, sFSpecO, sCol1
      WScript.Echo goFS.OpenTextFile(sFSpecO).ReadAll()
    

    Output:

    ARRAY ' ' 3 8
    Y
    25 75 100 125 150 175 200 225
    'A' 3 8 6 7 5 3 2 7
    'B' 1 9 7 8 4 7 2 5
    'C' 8 7 3 6 56 9 111 8
    
    "Time","A","B","C"
    25,3,1,8
    75,8,9,7
    100,6,7,3
    125,7,8,6
    150,5,4,56
    175,3,7,9
    200,2,2,111
    225,7,5,8
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a python script which outputs lots of data, sample is as below.
I have a array which contains values like this See below for script sample
I'm trying to write sql that produces the desired result from the data below.
Based on the function below, it is used to load data from file .dat.
I use the following code (from Bluetooth Chat sample app) to read the incoming
I am using the PHP below to submit data from an html form to
Below, I've attached a sample of my data as well as a sample of
I want to validate below data using regex and python. Below is the dump
Please help me figure a single query that will transform the data below... |id
I have three tables tag , page , pagetag With the data below page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.