Beispiel #1
0
        /// <summary>
        ///     Call RefreshPossiblePivotTableId() first!
        /// </summary>
        /// <returns></returns>
        internal string GetNextPossiblePivotTableName()
        {
            //uint i = PossiblePivotTableCacheId;

            // The cache ID doesn't have to coincide with the pivot table name.
            // In fact, Excel usually has different numbers for them. And I don't know how
            // Excel comes up with the cache IDs.
            var i     = (uint)PivotTableNames.Count + 1;
            var sName = string.Format("PivotTable{0}", i);

            // possible infinite loop, but how many pivot tables do you have anyway?
            while (PivotTableNames.Contains(sName))
            {
                ++i;
                sName = string.Format("PivotTable{0}", i);
            }
            return(sName);
        }
Beispiel #2
0
 internal bool HasPivotTableName(string PivotTableName)
 {
     return(PivotTableNames.Contains(PivotTableName));
 }