public void ShowLastData()
        {
            string exePath  = Environment.CurrentDirectory;
            string txtPath  = null;
            string xlsxPath = null;

            xlsxPath                     = exePath + "\\dataSave.xlsx";
            ExcelDataTable.dt            = ExcelUtility.ExcelToDataTable(xlsxPath, true);
            dataGridShowLast.ItemsSource = ExcelDataTable.dt.DefaultView;
        }
Beispiel #2
0
        public void ReadExcelData()
        {
            string address  = "";
            string filePath = this.textBoxDataAddress.Text;
            int    j        = 0;

            if (filePath[0] == '"')
            {
                address = filePath.Substring(1, filePath.Length - 2);
            }
            else
            {
                address = filePath;
            }
            ExcelData.dataTable = ExcelUtility.ExcelToDataTable(address, true);
        }