Exemple #1
0
        internal void SaveToXlsx(TOpenXmlWriter DataStream, string DocName, bool IsCache)
        {
            if (Attributes == null)
            {
                return;
            }
            DataStream.WriteStartDocument(DocName, true);
            foreach (TXlsxAttribute att in Attributes)
            {
                if (att.Namespace != "http://www.w3.org/2000/xmlns/")
                {
                    if (att.Name == "cacheId")
                    {
                        DataStream.WriteAtt("cacheId", CacheId);
                    }
                    else
                    {
                        DataStream.WriteAttRaw(att.Namespace, att.Name, att.Value);
                    }
                }
            }

            if (IsCache)
            {
                DataStream.WriteAtt("refreshOnLoad", true);
                DataStream.WriteAtt("upgradeOnRefresh", true);
            }
            foreach (TXlsxPivotRecord rec in FRecords)
            {
                rec.SaveToXlsx(DataStream);
            }
            DataStream.WriteEndDocument();
        }