protected internal ExcelDefinedNames(ExcelWorksheets worksheets, XmlDocument worksheetsXml)
        {
            _worksheets = worksheets;
            _worsheetsXml = worksheetsXml;

            _definedNames = worksheetsXml.SelectSingleNode("//d:definedNames", _worksheets.NsManager);
        }
Beispiel #2
0
 public void Dispose()
 {
     if (this.SharedStrings != null)
     {
         this.SharedStrings.Clear();
         this.SharedStrings = null;
     }
     if (this.SharedStringsList != null)
     {
         this.SharedStringsList.Clear();
         this.SharedStringsList = null;
     }
     this._vba = null;
     if (this._worksheets != null)
     {
         this._worksheets.Dispose();
         this._worksheets = null;
     }
     this.Package     = null;
     this._properties = null;
     if (this._formulaParser != null)
     {
         this._formulaParser.Dispose();
         this._formulaParser = null;
     }
 }
Beispiel #3
0
        public void Dispose()
        {
            _sharedStrings.Clear();
            _sharedStringsList.Clear();

            _sharedStrings     = null;
            _sharedStringsList = null;
            _vba = null;
            _worksheets.Dispose();
            _package       = null;
            _worksheets    = null;
            _properties    = null;
            _formulaParser = null;
        }
 public void Dispose()
 {
     _sharedStrings.Clear();
     _sharedStringsList.Clear();
     
     _sharedStrings = null;
     _sharedStringsList = null;
     _vba = null;
     if (_worksheets != null)
     {
         _worksheets.Dispose();
         _worksheets = null;
     }
     _package = null;
     _properties = null;
     if (_formulaParser != null)
     {
         _formulaParser.Dispose();
         _formulaParser = null;
     }   
 }
Beispiel #5
0
        private void SetDownCount(ExcelWorksheets ews, url_struct result_st)
        {
            //get sheet
            for (int i = 0; i < ews.Count; i++)
            {
                int sheet_idx = i + 1;
                ExcelWorksheet ew = ews[sheet_idx];
                //Console.WriteLine(ews[sheet_idx].Name + "==SetDownCount==" + result_st.sheet_name + _after_name);
                if (ew.Name.Equals(result_st.sheet_name + _after_name))
                {
                    //Console.WriteLine("==SetDownCount Equal== " + ews[sheet_idx].Name);
                    int start_row = 0;

                    //得到起始行
                    start_row = GetDataHead(ew, ew.Name);

                    if (start_row == 0)
                    {
                        return;
                    }

                    //游戏名对照
                    for (int j = start_row; j < ew.Dimension.Rows; j++)
                    {
                        int now_j = j + 1;
                        if (ew.Cells[now_j, 2].Text.Equals(result_st.game_name))
                        {
                            int col_offset = 0;
                            for (int m = 0; m < platform_list.Count; m++)
                            {
                                if (result_st.platform.Equals(platform_list[m]))
                                {
                                    col_offset = m;
                                }
                            }

                            ew.Cells[now_j, col_offset + 5].Value = result_st.count;
                            //Console.WriteLine("==SetDownCount==" + result_st.game_name + "  Platform::" + result_st.platform + " Content::" + result_st.count);
                            return;
                        }
                    }

                }
            }
        }
 public void SetUp()
 {
     if (File.Exists(Filename)) { File.Delete(Filename); }
     package = new ExcelPackage(new FileInfo(Filename));
     doc = package.Workbook.Worksheets;
 }
 void IDisposable.Dispose()
 {
     ((IDisposable)_worksheets).Dispose();
     _worksheets = null;
 }