コード例 #1
0
        /// <summary> A factory method which takes in an excel file and reads in the contents.
        ///
        /// </summary>
        /// <exception cref=""> IOException
        /// </exception>
        /// <exception cref=""> BiffException
        /// </exception>
        /// <param name="is">an open stream which is the the excel 97 spreadsheet to parse
        /// </param>
        /// <param name="ws">the settings for the workbook
        /// </param>
        /// <returns> a workbook instance
        /// </returns>
        public static Workbook getWorkbook(Stream stream, WorkbookSettings ws)
        {
            NExcel.Read.Biff.File dataFile = new NExcel.Read.Biff.File(stream, ws);

            Workbook workbook = new WorkbookParser(dataFile, ws);

            workbook.parse();

            return(workbook);
        }