make a csv file and more coloms

Discussion in 'Questions (Windows Mobile)' started by sunnyboyj, Dec 11, 2007.

  1. sunnyboyj

    sunnyboyj Member

    I am able to write a file. For this example I write the value porder and soortreg to the oee.csv file. How do I make a 'real' csv file and more important how do I make coloms:

    i now have a file what looks like:

    I want to have the file looks like:

    sub btnoeereg_Click
    ' ErrorLabel(errSaveINI)
    FileOpen( c1,"oee.csv",cwrite,cAppend)
    Return'If there were no "Return" here, the error message would have shown.
    Msgbox("Error writing INI file.","",cMsgboxOK,cMsgboxHand)
    End Sub
  2. specci48

    specci48 Well-Known Member Licensed User

    Hi sunnyboyj,

    you should use a table to save your data.
    I added an example of creating a small table and saving it to csv (one time with and on time without a header).
    If you want to use a table as an "internal storage", you can set the visible property to false.


    Attached Files:

  3. sunnyboyj

    sunnyboyj Member

    Thanks, you are fast!
    I will try it with your suggestions
  4. sunnyboyj

    sunnyboyj Member

    I understand the addcol and addrow now, thanxs! But how do I save the information from button artnr, porder and soortreg into the file (I thought it would work like this, but it does not). Also I want to 'append' the file when generating more info by pressing the OK button.

    Table1.AddCol(cString, "Artnr", 50)
    Table1.AddCol(cString, "Porder", 50)
    Table1.AddCol(cString, "Soortreg", 50)
    Table1.SaveCSV("WithoutHeader.csv", ",", False)
  5. Rioven

    Rioven Active Member Licensed User

    Add quote marks for string cells...
  6. sunnyboyj

    sunnyboyj Member

    Thanks for your response!
    I have checked it and worked out that I have to use:
    Table1.AddRow(porder.text,soortreg.text etc.etc....)
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice