User Tag List

Results 1 to 3 of 3

Thread: Loading CSV files with empty cells?

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Lacey, WA
    Posts
    755
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Loading CSV files with empty cells?

    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?

  2. #2
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleInstall Creator Pro

    Join Date
    Dec 2010
    Location
    United Kingdom
    Posts
    960
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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 <, ",,", ", ," )

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Lacey, WA
    Posts
    755
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah I didn't know about that object! Though I decided to make my own "String Parser" using the Find commands and made it work with no extensions

Similar Threads

  1. Loading Multiple Ini Files
    By coreyschroeder in forum Fusion 2.5
    Replies: 6
    Last Post: 23rd April 2014, 02:16 PM
  2. Loading files such as INI,Text files, List Files?
    By Gibbon in forum SWF/Flash Export Module Version 2.0
    Replies: 3
    Last Post: 21st July 2012, 07:41 AM
  3. INI Files Saving and Loading
    By Power2r in forum XNA Export Module Version 2.0
    Replies: 3
    Last Post: 1st August 2011, 08:14 AM
  4. Saving/Loading files
    By Namo in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 26th July 2009, 08:21 AM
  5. Help finding how many selected cells??
    By Gibbon in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 2nd July 2009, 04:00 PM

Posting Permissions

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