Ejemplo n.º 1
0
        /// <summary>
        /// Adds a new SharedStringItem and returns its index that is used as cell value
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        public int AddSharedStringItem(SpreadsheetSharedStringItem item)
        {
            var existingItem = _sharedStringItems.FindIndex(i => i.Text == item.Text);

            if (existingItem != -1)
            {
                return(existingItem);
            }

            _sharedStringItems.Add(item);
            return(_sharedStringItems.Count - 1);
        }
Ejemplo n.º 2
0
 public void ChangeSharedStringItem(int itemIndex, SpreadsheetSharedStringItem newValue)
 {
     _sharedStringItems[itemIndex] = newValue;
 }