当前位置: 首页>>代码示例>>C#>>正文


C# IWorkbook.CreateSheet方法代码示例

本文整理汇总了C#中IWorkbook.CreateSheet方法的典型用法代码示例。如果您正苦于以下问题:C# IWorkbook.CreateSheet方法的具体用法?C# IWorkbook.CreateSheet怎么用?C# IWorkbook.CreateSheet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IWorkbook的用法示例。


在下文中一共展示了IWorkbook.CreateSheet方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Confirm

        private void Confirm(IWorkbook wb)
        {
            ISheet sheet = wb.CreateSheet("new sheet");
            cell11 = sheet.CreateRow(0).CreateCell(0);
            cell11.SetCellType(CellType.Formula);

            Confirm("PROPER(\"hi there\")", "Hi There");
            Confirm("PROPER(\"what's up\")", "What'S Up");
            Confirm("PROPER(\"I DON'T TH!NK SO!\")", "I Don'T Th!Nk So!");
            Confirm("PROPER(\"dr\u00dcb\u00f6'\u00e4 \u00e9lo\u015f|\u00eb\u00e8 \")", "Dr\u00fcb\u00f6'\u00c4 \u00c9lo\u015f|\u00cb\u00e8 ");
            Confirm("PROPER(\"hi123 the123re\")", "Hi123 The123Re");
            Confirm("PROPER(\"-\")", "-");
            Confirm("PROPER(\"!\u00a7$\")", "!\u00a7$");
            Confirm("PROPER(\"/&%\")", "/&%");

            // also test longer string
            StringBuilder builder = new StringBuilder("A");
            StringBuilder expected = new StringBuilder("A");
            for (int i = 1; i < 254; i++)
            {
                builder.Append((char)(65 + (i % 26)));
                expected.Append((char)(97 + (i % 26)));
            }
            Confirm("PROPER(\"" + builder.ToString() + "\")", expected.ToString());
        }
开发者ID:Reinakumiko,项目名称:npoi,代码行数:25,代码来源:TestProper.cs

示例2: FillData

        private void FillData(IWorkbook p_wb)
        {
            ISheet sheet = p_wb.CreateSheet("sheet123");
            sheet.RowSumsBelow = (/*setter*/false);
            int i;
            for (i = 0; i < ROWS_NUMBER; i++)
            {
                IRow row = sheet.CreateRow(i);
                ICell cell = row.CreateCell(0);
                cell.SetCellValue(i + 1);
            }

            i = 1;
            while (i < ROWS_NUMBER)
            {
                int end = i + (GROUP_SIZE - 2);
                int start = i;                    // natural order
                //            int start = end - 1;                // reverse order
                while (start < end)
                {             // natural order
                    //                while (start >= i) {            // reverse order
                    sheet.GroupRow(start, end);
                    //o_groupsNumber++;
                    bool collapsed = IsCollapsed();
                    //System.out.Println("Set group " + start + "->" + end + " to " + collapsed);
                    sheet.SetRowGroupCollapsed(start, collapsed);
                    start++;                      // natural order
                    //                start--;                        // reverse order
                }
                i += GROUP_SIZE;
            }
        }
开发者ID:Reinakumiko,项目名称:npoi,代码行数:32,代码来源:TestXSSFSheetRowGrouping.cs

示例3: Init

        public bool Init()
        {
            if (!File.Exists(m_StrategyName))
            {
                m_StrategyWorkBook = new XSSFWorkbook();
                m_StrategySheet = (ISheet)m_StrategyWorkBook.CreateSheet("Sheet1");

                IRow Row = m_StrategySheet.CreateRow(0);
                Row.CreateCell(0).SetCellValue("-500");
                Row.CreateCell(1).SetCellValue("-450");
                Row.CreateCell(2).SetCellValue("-400");
                Row.CreateCell(3).SetCellValue("-350");
                Row.CreateCell(4).SetCellValue("-300");
                Row.CreateCell(5).SetCellValue("-250");
                Row.CreateCell(6).SetCellValue("-200");
                Row.CreateCell(7).SetCellValue("-150");
                Row.CreateCell(8).SetCellValue("-100");
                Row.CreateCell(9).SetCellValue("-50");
                Row.CreateCell(10).SetCellValue("0");
                Row.CreateCell(11).SetCellValue("50");
                Row.CreateCell(12).SetCellValue("100");
                Row.CreateCell(13).SetCellValue("150");
                Row.CreateCell(14).SetCellValue("200");
                Row.CreateCell(15).SetCellValue("250");
                Row.CreateCell(16).SetCellValue("300");
                Row.CreateCell(17).SetCellValue("350");
                Row.CreateCell(18).SetCellValue("400");
                Row.CreateCell(19).SetCellValue("450");
                Row.CreateCell(20).SetCellValue("500");
                return true;
            }
            return false;
        }
开发者ID:s850042002,项目名称:ostock-simulation,代码行数:33,代码来源:SpotExcel.cs

示例4: buildWorkbook

        private void buildWorkbook(IWorkbook wb)
        {
            ISheet sh = wb.CreateSheet();
            IRow row1 = sh.CreateRow(0);
            IRow row2 = sh.CreateRow(1);
            row3 = sh.CreateRow(2);

            row1.CreateCell(0, CellType.Numeric);
            row1.CreateCell(1, CellType.Numeric);

            row2.CreateCell(0, CellType.Numeric);
            row2.CreateCell(1, CellType.Numeric);

            row3.CreateCell(0);
            row3.CreateCell(1);

            CellReference a1 = new CellReference("A1");
            CellReference a2 = new CellReference("A2");
            CellReference b1 = new CellReference("B1");
            CellReference b2 = new CellReference("B2");

            sh.GetRow(a1.Row).GetCell(a1.Col).SetCellValue(35);
            sh.GetRow(a2.Row).GetCell(a2.Col).SetCellValue(0);
            sh.GetRow(b1.Row).GetCell(b1.Col).CellFormula = (/*setter*/"A1/A2");
            sh.GetRow(b2.Row).GetCell(b2.Col).CellFormula = (/*setter*/"NA()");

            Evaluator = wb.GetCreationHelper().CreateFormulaEvaluator();
        }
开发者ID:Reinakumiko,项目名称:npoi,代码行数:28,代码来源:TestLogicalFunction.cs

示例5: SheetWriter

            public SheetWriter(IWorkbook wb)
            {
                ISheet sheet = wb.CreateSheet("Sheet1");

                WriteHeaderRow(wb, sheet);
                _sheet = sheet;
                _rowIndex = 1;
            }
开发者ID:xoposhiy,项目名称:npoi,代码行数:8,代码来源:NumberComparingSpreadsheetGenerator.cs

示例6: EntryKillsTeamSheet

		public EntryKillsTeamSheet(IWorkbook workbook, Demo demo)
		{
			Headers = new Dictionary<string, CellType>(){
				{ "Name", CellType.String },
				{ "Total", CellType.Numeric },
				{ "Win", CellType.Numeric },
				{ "Loss", CellType.Numeric },
				{ "Ratio", CellType.String }
			};
			Demo = demo;
			Sheet = workbook.CreateSheet("Entry Kills Teams");
		}
开发者ID:green-s,项目名称:CSGO-Demos-Manager,代码行数:12,代码来源:EntryKillsTeamSheet.cs

示例7: OpenKillsPlayerSheet

		public OpenKillsPlayerSheet(IWorkbook workbook, Demo demo)
		{
			Headers = new Dictionary<string, CellType>(){
				{ "Name", CellType.String },
				{ "SteamID", CellType.String },
				{ "Total", CellType.Numeric },
				{ "Win", CellType.Numeric },
				{ "Loss", CellType.Numeric },
				{ "Ratio", CellType.String }
			};
			Demo = demo;
			Sheet = workbook.CreateSheet("Open Kills Players");
		}
开发者ID:green-s,项目名称:CSGO-Demos-Manager,代码行数:13,代码来源:OpenKillsPlayerSheet.cs

示例8: EntryKillsRoundSheet

		public EntryKillsRoundSheet(IWorkbook workbook, Demo demo)
		{
			Headers = new Dictionary<string, CellType>(){
				{ "Number", CellType.Numeric },
				{ "Killer Name", CellType.String},
				{ "Killer SteamID", CellType.String },
				{ "Killed Name", CellType.String },
				{ "Killed SteamID", CellType.String },
				{ "Weapon", CellType.String },
				{ "Result", CellType.String }
			};
			Demo = demo;
			Sheet = workbook.CreateSheet("Entry Kills Rounds");
		}
开发者ID:green-s,项目名称:CSGO-Demos-Manager,代码行数:14,代码来源:EntryKillsRoundSheet.cs

示例9: GeneralSheet

		public GeneralSheet(IWorkbook workbook, List<Demo> demos)
		{
			Headers = new Dictionary<string, CellType>(){
				{ "Filename", CellType.String },
				{ "Type", CellType.String },
				{ "Source", CellType.String },
				{ "Map", CellType.String },
				{ "Hostname", CellType.String },
				{ "Client", CellType.String },
				{ "Server Tickrate", CellType.Numeric },
				{ "Framerate", CellType.Numeric },
				{ "Duration", CellType.Numeric },
				{ "Name team 1", CellType.String },
				{ "Name team 2", CellType.String },
				{ "Score team 1", CellType.Numeric },
				{ "Score team 2", CellType.Numeric },
				{ "Score 1st half team 1", CellType.Numeric },
				{ "Score 1st half team 2", CellType.Numeric },
				{ "Score 2nd half team 1", CellType.Numeric },
				{ "Score 2nd half team 2", CellType.Numeric },
				{ "Winner", CellType.String },
				{ "Kills", CellType.Numeric },
				{ "Assists", CellType.Numeric },
				{ "5K", CellType.Numeric },
				{ "4K", CellType.Numeric },
				{ "3K", CellType.Numeric },
				{ "2K", CellType.Numeric },
				{ "1K", CellType.Numeric },
				{ "Average Damage Per Round", CellType.Numeric },
				{ "Total Damage Health", CellType.Numeric },
				{ "Total Damage Armor", CellType.Numeric },
				{ "Clutch", CellType.Numeric },
				{ "Bomb Defused", CellType.Numeric },
				{ "Bomb Exploded", CellType.Numeric },
				{ "Bomb Planted", CellType.Numeric },
				{ "Flashbang", CellType.Numeric },
				{ "Smoke", CellType.Numeric },
				{ "HE", CellType.Numeric },
				{ "Decoy", CellType.Numeric },
				{ "Molotov", CellType.Numeric },
				{ "Incendiary", CellType.Numeric },
				{ "Shots", CellType.Numeric },
				{ "Hits", CellType.Numeric },
				{ "Round", CellType.Numeric },
				{ "Comment", CellType.String },
				{ "Cheater", CellType.Boolean }
			};
			Demos = demos;
			Sheet = workbook.CreateSheet("General");
		}
开发者ID:green-s,项目名称:CSGO-Demos-Manager,代码行数:50,代码来源:GeneralSheet.cs

示例10: PlayersSheet

		public PlayersSheet(IWorkbook workbook, Demo demo)
		{
			Headers = new Dictionary<string, CellType>(){
				{ "Name", CellType.String },
				{ "SteamID", CellType.String },
				{ "Rank", CellType.Numeric },
				{ "Team", CellType.String },
				{ "Kills", CellType.Numeric },
				{ "Assists", CellType.Numeric },
				{ "Deaths", CellType.Numeric },
				{ "K/D", CellType.Numeric },
				{ "HS", CellType.Numeric },
				{ "HS%", CellType.Numeric },
				{ "Team kill", CellType.Numeric },
				{ "Entry kill", CellType.Numeric },
				{ "Bomb planted", CellType.Numeric },
				{ "Bomb defused", CellType.Numeric },
				{ "MVP", CellType.Numeric },
				{ "Score", CellType.Numeric },
				{ "Rating", CellType.Numeric },
				{ "KPR", CellType.Numeric },
				{ "APR", CellType.Numeric },
				{ "DPR", CellType.Numeric },
				{ "ADR", CellType.Numeric },
				{ "TDH", CellType.Numeric },
				{ "TDA", CellType.Numeric },
				{ "5K", CellType.Numeric },
				{ "4K", CellType.Numeric },
				{ "3K", CellType.Numeric },
				{ "2K", CellType.Numeric },
				{ "1K", CellType.Numeric },
				{ "Crouch kill", CellType.Numeric },
				{ "Jump kill", CellType.Numeric },
				{ "1v1", CellType.Numeric },
				{ "1v2", CellType.Numeric },
				{ "1v3", CellType.Numeric },
				{ "1v4", CellType.Numeric },
				{ "1v5", CellType.Numeric },
				{ "Flashbang", CellType.Numeric },
				{ "Smoke", CellType.Numeric },
				{ "HE", CellType.Numeric },
				{ "Decoy", CellType.Numeric },
				{ "Molotov", CellType.Numeric },
				{ "Incendiary", CellType.Numeric },
				{ "VAC", CellType.Boolean },
				{ "OW", CellType.Boolean },
			};
			Demo = demo;
			Sheet = workbook.CreateSheet("Players");
		}
开发者ID:green-s,项目名称:CSGO-Demos-Manager,代码行数:50,代码来源:PlayersSheet.cs

示例11: WeaponsSheet

		public WeaponsSheet(IWorkbook workbook, List<Demo> demos)
		{
			Headers = new Dictionary<string, CellType>()
			{
				{"Name", CellType.String},
				{"Kills", CellType.Numeric},
				{"Damage health", CellType.Numeric},
				{"Damage armor", CellType.Numeric},
				{"Shots", CellType.Numeric},
				{"Hits", CellType.Numeric},
				{"Accuracy %", CellType.Numeric}
			};
			Demos = demos;
			Sheet = workbook.CreateSheet("Weapons");
		}
开发者ID:green-s,项目名称:CSGO-Demos-Manager,代码行数:15,代码来源:WeaponsSheet.cs

示例12: Init

        public void Init()
        {
            if (!File.Exists(m_sFileName))
            {
                m_StrategyWorkBook = new XSSFWorkbook();
                m_StrategySheet = (ISheet)m_StrategyWorkBook.CreateSheet("Sheet1");

                IRow Row = m_StrategySheet.CreateRow(0);
                int nCount = 0;
                foreach(KeyValuePair<int, int> kp in m_DicLetter)
                {
                    Row.CreateCell(nCount).SetCellValue(kp.Key);
                    nCount++;
                }
            }
        }
开发者ID:s850042002,项目名称:ostock-simulation,代码行数:16,代码来源:Options.cs

示例13: LoadExcel

        public void LoadExcel()
        {
            m_OrderLogWorkBook = new XSSFWorkbook();
            m_OrderLogSheet = (ISheet)m_OrderLogWorkBook.CreateSheet("Sheet1");

            IRow Row = m_OrderLogSheet.CreateRow(0);
            Row.CreateCell(0).SetCellValue("日期");
            Row.CreateCell(1).SetCellValue("策略");
            Row.CreateCell(2).SetCellValue("停利");
            Row.CreateCell(3).SetCellValue("停損");
            Row.CreateCell(4).SetCellValue("多空");
            Row.CreateCell(5).SetCellValue("口數");
            Row.CreateCell(6).SetCellValue("成交價");
            Row.CreateCell(7).SetCellValue("獲利");
            Row.CreateCell(8).SetCellValue("結果");
            Row.CreateCell(9).SetCellValue("其他");
        }
开发者ID:s850042002,项目名称:ostock-simulation,代码行数:17,代码来源:OrderLog.cs

示例14: TeamsSheet

		public TeamsSheet(IWorkbook workbook, List<Demo> demos)
		{
			Headers = new Dictionary<string, CellType>()
			{
				{"Name", CellType.String},
				{"Match", CellType.Numeric},
				{"Win", CellType.Numeric},
				{"Lost", CellType.Numeric},
				{"Kills", CellType.Numeric},
				{"Deaths", CellType.Numeric},
				{"Assists", CellType.Numeric},
				{"Rounds", CellType.Numeric},
				{"Round win", CellType.Numeric},
				{"Round lost", CellType.Numeric},
				{"Round CT win", CellType.Numeric},
				{"Round CT lost", CellType.Numeric},
				{"Round T win", CellType.Numeric},
				{"Round T lost", CellType.Numeric},
				{"Win pistol round", CellType.Numeric},
				{"Win eco round", CellType.Numeric},
				{"Win semi-eco round", CellType.Numeric},
				{"Win force-buy round", CellType.Numeric},
				{"Bomb planted", CellType.Numeric},
				{"Bomb defused", CellType.Numeric},
				{"Bomb exploded", CellType.Numeric},
				{"Bomb planted on A", CellType.Numeric},
				{"Bomb planted on B", CellType.Numeric},
				{"5K", CellType.Numeric},
				{"4K", CellType.Numeric},
				{"3K", CellType.Numeric},
				{"2K", CellType.Numeric},
				{"1K", CellType.Numeric},
				{"Jump kill", CellType.Numeric},
				{"Crouch kill", CellType.Numeric},
				{"Flash", CellType.Numeric},
				{"HE", CellType.Numeric},
				{"Smoke", CellType.Numeric},
				{"Molotov", CellType.Numeric},
				{"Incendiary", CellType.Numeric},
				{"Decoy", CellType.Numeric},
			};
			Demos = demos;
			Sheet = workbook.CreateSheet("Teams");
		}
开发者ID:green-s,项目名称:CSGO-Demos-Manager,代码行数:44,代码来源:TeamsSheet.cs

示例15: SheetLimits

        public SheetLimits(IWorkbook workbook, string date)
        {
            this.workbook = workbook;
            this.date = date;
            sheet = workbook.CreateSheet(date + "-Лимиты");
            summedCells = new List<int>();

            cellStyles = new CellStyles(workbook);
            styleInnerHeading = cellStyles.InnerHeadline();
            styleHeading = cellStyles.Heading();
            styleHeadingSum = cellStyles.HeadingSum();
            styleHeadline = cellStyles.Headline();
            styleTable = cellStyles.LimitsTable();
            styleDouble = cellStyles.LimitsDouble();
            styleDoubleBold = cellStyles.LimitsDoubleBold();
            styleCorpColor = cellStyles.CorpColor();
            styleLimitsDoubleSum = cellStyles.LimitsDoubleSum();
            styleResultHeadline = cellStyles.ResultHeadline();
        }
开发者ID:novg,项目名称:ReportPstn,代码行数:19,代码来源:SheetLimits.cs


注:本文中的IWorkbook.CreateSheet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。