コード例 #1
0
        private void btnLoad_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new OpenFileDialog();
            dialog.FileName = "Document";
            dialog.DefaultExt = ".xlsx";
            dialog.Filter = "XLSX documents (.xlsx)|*.xlsx";

            var result = dialog.ShowDialog();
            if (result == true)
            {
                _reader = new XLSXReader(dialog.FileName);
                sldSheetNum.Maximum = _reader.SheetsCount;
                SetSaveVisibility(true);
            }
        }
コード例 #2
0
        /// <summary>
        /// Excel文件
        /// </summary>
        /// <param name="tables"></param>
        public ExcelFile(DataTableCollection tables)
        {
            m_sheets = new Dictionary <string, WorkSheet>();

            int i     = 0;
            int count = tables.Count;

            XLSXReader.Log(">>>[1] Tabel Count: " + tables.Count);

            while (i < count)
            {
                WorkSheet sheet = new WorkSheet(tables[i], i);
                m_sheets[sheet.name] = sheet;
                i++;
            }
        }