Copy Paste Row Column from Excel into Unity Input Fields all at once


I have about 14 cells in a row in Excel, would like to copy that into 14 Unity input boxes all at once.

  1. I copy the 14 cells as per usual workflow in Excel,
  2. Paste starting the “1st” input box in Unity,
  3. all of the “14 cells” data is pasted into the 1st input box…

Work around please?

  1. I would like to achieve this with multiple rows and columns as well…

Thank you!

Unity has absolutely nothing to do with excel! unity is not intended as a word processor so it sopports basic reading of text in ascii or UTF8 format…it’s going to read text just like basic windows notepad.

so Your best approach would be exporting your text from excel into a basic txt format. then put that into your unity asset folder as a text asset

once the text asset is in your game assets. It could be dragged an dropped into an empty text asset variable declaired in one of your scripts.

alternativly unity has the ability to read text directly from a hard drive if you are making a project for PC.

 // need this at top of script
 using System; 
 using System.IO; 
 using System.Diagnostics;
      //write a file to a hard drive like this:
      File.WriteAllText("C:/somefolder/somefile.txt","blah blah blah");
      //read a file on a hard drive like this:
      String txt;
         print("got this: "+txt);}

from there you would need to manualy program into your unity code what to do with it. or how to display it. unity is not going to understand row or colum information from exell. You would have to manually program code yourself for that sort of thing.