src/BloomExe/Spreadsheet/InternalSpreadsheet.cs
/// <summary>
/// Adds a column. If the column label already exists, no changes will be made nor will a new column be added
/// </summary>
/// <param name="columnLabel">The label of the column</param>
/// <param name="columnFriendlyName">The friendly name of the column</param>
/// <param name="friendlyNameComment">Optional. If non-null and non-empty, sets a comment in the newly created cell for the friendly name of the column.</param>
/// <returns>The index of the column (0-based)</returns>
Adds a column. If the column label already exists, no changes will be made nor will a new column be added
Adds a column . If the column label already exists no changes will be made nor will a new column be added
public int AddColumnForTag(string columnLabel, string columnFriendlyName, string friendlyNameComment = null)
		{
			for (var i = 0; i < Header.ColumnCount; i++)
			{
				if (Header.ColumnIdRow.GetCell(i).Content.Equals(columnLabel))
				{
					return i;
				}
			}
			var addedCells = Header.AddColumn(columnLabel, columnFriendlyName);
			if (!string.IsNullOrEmpty(friendlyNameComment))
			{
				addedCells.nameCell.Comment = friendlyNameComment;
			}
			return Header.ColumnCount - 1;
		}
public int AddColumnForTag ( string columnLabel , string columnFriendlyName , string friendlyNameComment = null ) { for ( var i = 0 ; i < Header . ColumnCount ; i ++ ) { if ( Header . ColumnIdRow . GetCell ( i ) . Content . Equals ( columnLabel ) ) { return i ; } } var addedCells = Header . AddColumn ( columnLabel , columnFriendlyName ) ; if ( ! string . IsNullOrEmpty ( friendlyNameComment ) ) { addedCells . nameCell . Comment = friendlyNameComment ; } return Header . ColumnCount - 1 ; }
Adds a column.
Adds a column .
The index of the column (0-based)
The index of the column ( 0 - based )
columnLabel
string
The label of the column
The label of the column
columnFriendlyName
string
The friendly name of the column
The friendly name of the column
friendlyNameComment
string
Optional. If non-null and non-empty, sets a comment in the newly created cell for the friendly name of the column.
Optional . If non - null and non - empty sets a comment in the newly created cell for the friendly name of the column .