How do I write data from an array to newline in text file

0 favourites
  • 3 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • hi friends

    i save my data from an array in game to a text file in desktop,but the data save in a line and i want save each of array's row in newline in text file.is there anybody know how can i do this in construct?

    also i have another question is it possible to write and save data from array in construct to an excel file ?i need to save my data in to excel file but unfortunately i cant find a way to do this

  • hi friends

    i save my data from an array in game to a text file in desktop,but the data save in a line and i want save each of array's row in newline in text file.is there anybody know how can i do this in construct?

    also i have another question is it possible to write and save data from array in construct to an excel file ?i need to save my data in to excel file but unfortunately i cant find a way to do this

    Use "\r\n" to insert a line break into a text file.

    You can parse an array and save it out in csv format, which Excel can open. CSV is just the data of each table cell divided by a comma: https://en.wikipedia.org/wiki/Comma-separated_values

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • digitalsoapbox thank you csv was perfect solution.however i did not understand your answer about line break.now my data is in array and i download its data as string (invoke download of string array.AsJSON ....) but unfortunately in excel all data shows in a line .do you have any suggestion about this?while i 'm using line break it shows as a string in excel file.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)