public Excel.Worksheet AddEvidence()
        {
            var tmp = App.Excel.ScreenUpdating;

            App.Excel.ScreenUpdating = false;

            try
            {
                Excel.Worksheet worksheet = ExcelHelper.WorksheetAdd(this.Workbook);
                string          newName   = this.NewEvidenceName();
                worksheet.Name = newName;

                ExcelWorksheetCustomPropertyAccessor.Set(worksheet, EVIDENCE_PROPERTY, true.ToString());

                //string address = "=" + newName + "!A1";
                //Log.Logger.DebugFormat("address = {0}", address);

                //Excel.Name newName = this.Workbook.Names.Add(
                //    newName,
                //    address);

                return(worksheet);
            }
            finally
            {
                App.Excel.ScreenUpdating = tmp;
            }
        }
Esempio n. 2
0
        public void Save()
        {
            var json = JsonConvert.SerializeObject(this.settings);

            ExcelWorksheetCustomPropertyAccessor.Set(this.Worksheet, SettingPropertyName, json);
        }