コード例 #1
0
        public void AddRow(double?rowHeight, bool isHidden)
        {
            // Add the row and set collated information
            var newRow = sheetData.AddRow();

            // Set the height?
            if (rowHeight.HasValue)
            {
                newRow.Height       = new DocumentFormat.OpenXml.DoubleValue(rowHeight);
                newRow.CustomHeight = new DocumentFormat.OpenXml.BooleanValue(true);
            }

            // Hide?
            if (isHidden)
            {
                newRow.Hidden = new DocumentFormat.OpenXml.BooleanValue(true);
            }

            // Add in to dictionary
            excelRows.Add((uint)excelRows.Count + 1, newRow);
        }