Loading CSV files with empty cells?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I am trying to load in data from a CSV file into an Array and am finding that both the String Tokenizer and String Parser objects both ignore empty elements and mess up the array... is there any way around this? Is there a token based string-splitting object out there that will load empty elements?

    Please login to see this link.
    Please login to see this link.

  • I never noticed that. I would be inclined to say it's a bug (but Clickteam didn't make either object, so it's not one for the bug box), since retrieving empty elements between the delimiters is the logical approach.

    Focusing and testing the String Tokenizer, this is what happens:
    Input: test1,test2,,test4
    Elements expected: 'test 1' ... 'test 2' ... '' ... 'test4'
    But what happens: 'test 1' ... 'test 2' ... 'test4' ... ''

    As a workaround, you could use the Regular Expressions Object to replace ,, with , , (a space, or other character) so that this extension does pick up a character between the delimiter.

    This would be expression for "Split string":
    ReplaceSRF$( "Regular Expressions object", > CSV Input <, ",,", ", ," )

    Please login to see this link. - The encyclopaedia written by clickers, for the community.
    Please login to see this link. | Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!