Beispiel #1
0
        private void ReadRangeSets(TOpenXmlReader DataStream)
        {
            if (DataStream.IsSimpleTag)
            {
                DataStream.NextTag(); return;
            }
            string StartElement = DataStream.RecordName();

            if (!DataStream.NextTag())
            {
                return;
            }

            while (!DataStream.AtEndElement(StartElement))
            {
                switch (DataStream.RecordName())
                {
                case "rangeSet":
                    RangeSets.Add(TRangeSet.LoadFromXlsx(DataStream));
                    break;

                default:
                    DataStream.GetXml();     //Shouldn't happen.
                    break;
                }
            }
        }
Beispiel #2
0
        internal static TRangeSet LoadFromXlsx(TOpenXmlReader DataStream)
        {
            TRangeSet Result = new TRangeSet();

            for (int i = 0; i < Result.ix.Length; i++)
            {
                Result.ix[i] = DataStream.GetAttributeAsInt("i" + (i + 1).ToString(CultureInfo.InvariantCulture), -1);
            }
            Result.Source = new TWorksheetSource();
            Result.Source.LoadAttsFromXlsx(DataStream);
            DataStream.FinishTag();
            return(Result);
        }