public void SH002_SheetNames(string name, int numberOfSheets)
        {
            FileInfo sourceXlsx = new FileInfo(Path.Combine(TestUtil.SourceDir.FullName, name));

            using (SpreadsheetDocument sDoc = SpreadsheetDocument.Open(sourceXlsx.FullName, true))
            {
                var sheetNames = SmlDataRetriever.SheetNames(sDoc);
                Assert.Equal(numberOfSheets, sheetNames.Length);
            }
        }
Ejemplo n.º 2
0
        public void SH002_SheetNames(string name, int numberOfSheets)
        {
            var sourceDir  = new DirectoryInfo("../../../../TestFiles/");
            var sourceXlsx = new FileInfo(Path.Combine(sourceDir.FullName, name));

            using var sDoc = SpreadsheetDocument.Open(sourceXlsx.FullName, false);
            var sheetNames = SmlDataRetriever.SheetNames(sDoc);

            Assert.Equal(numberOfSheets, sheetNames.Length);
        }
Ejemplo n.º 3
0
        public string[] GetSheetNames(string filePath)
        {
            var sheets = SmlDataRetriever.SheetNames(filePath);

            return(sheets);
        }