Example #1
0
    void Start()
    {
        Text T = GameObject.Find("Canvas/Text").GetComponent <Text>();

        T.text   = "";//清空一开始的文本
        listdata = DoExcel.Load(Application.dataPath + "\\Data\\" + "test.xlsx");
        foreach (var listing in listdata)
        {
            print(listing.instruct + "     " + listing.word);
            T.text += (listing.instruct + "     " + listing.word + "\n").ToString();
        }
    }
    void Start()
    {
        //读
        Text T = GameObject.Find("Canvas/Text").GetComponent <Text>();

        T.text   = "";//清空一开始的文本
        listdata = DoExcel.Load(Application.streamingAssetsPath + "/Test2007.xlsx");

        foreach (var listing in listdata)
        {
            print(listing.instruct + "     " + listing.word);
            T.text += (listing.instruct + "     " + listing.word + "\n").ToString();
        }

        //写
        //WriteExcel(Application.streamingAssetsPath + "/Test2007.xls");
    }
Example #3
0
 void read()
 {
     listdata = DoExcel.Load(Application.dataPath + "/Tools_DK/Excel/Data/" + "test.xlsx");
 }