dalvikvm: Late-enabling CheckJNI
dalvikvm: Could not find method android.content.pm.PackageManager.getPackageInstaller, referenced from method com.google.android.gms.common.zze.zzi
dalvikvm: VFY: unable to resolve virtual method 547: Landroid content pm PackageManager;.getPackageInstaller ()Landroid content pm PackageInstaller;
dalvikvm: VFY: replacing opcode 0x6e at 0x000b
GMPM: App measurement is starting up, version: 8487
GMPM: To enable debug logging run: adb shell setprop log.tag.GMPM VERBOSE
GMPM: GoogleService failed to initialize, status: 10, Missing an expected resource: 'R.string.google_app_id' for initializing Google services. Possible causes are missing google-services.json or com.google.gms.google-services gradle plugin.
GMPM: Scheduler not set. Not logging error warn.
dalvikvm: VFY: unable to find class referenced in signature (Landroid view SearchEvent;)
dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested
dalvikvm: VFY: unable to resolve interface method 16064: Landroid view Window$Callback;.onSearchRequested (Landroid view SearchEvent;)Z
dalvikvm: VFY: replacing opcode 0x72 at 0x0002
dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode
dalvikvm: VFY: unable to resolve interface method 16068: Landroid view Window$Callback;.onWindowStartingActionMode (Landroid view ActionMode$Callback;I)Landroid view ActionMode;
dalvikvm: VFY: replacing opcode 0x72 at 0x0002
GMPM: Uploading is not possible. App measurement disabled
dalvikvm: GC_FOR_ALLOC freed 317K, 11% free 3326K 3712K, paused 4ms, total 5ms
dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations
dalvikvm: VFY: unable to resolve virtual method 626: Landroid content res TypedArray;.getChangingConfigurations ()I
dalvikvm: VFY: replacing opcode 0x6e at 0x0002
dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType
dalvikvm: VFY: unable to resolve virtual method 648: Landroid content res TypedArray;.getType (I)I
dalvikvm: VFY: replacing opcode 0x6e at 0x0002
dalvikvm: Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawable
dalvikvm: VFY: unable to resolve virtual method 589: Landroid content res Resources;.getDrawable (ILandroid content res Resources$Theme;)Landroid graphics drawable Drawable;
dalvikvm: VFY: replacing opcode 0x6e at 0x0002
dalvikvm: Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawableForDensity
dalvikvm: VFY: unable to resolve virtual method 591: Landroid content res Resources;.getDrawableForDensity (IILandroid content res Resources$Theme;)Landroid graphics drawable Drawable;
dalvikvm: VFY: replacing opcode 0x6e at 0x0002
libEGL: loaded system lib egl libEGL_genymotion.so
libEGL: loaded system lib egl libGLESv1_CM_genymotion.so
libEGL: loaded system lib egl libGLESv2_genymotion.so
EGL_genymotion: eglSurfaceAttrib not implemented
OpenGLRenderer: Getting MAX_TEXTURE_SIZE from GradienCache
OpenGLRenderer: MAX_TEXTURE_SIZE: 8192
OpenGLRenderer: Getting MAX_TEXTURE_SIZE from Caches::initConstraints()
OpenGLRenderer: MAX_TEXTURE_SIZE: 8192
OpenGLRenderer: Enabling debug mode 0
GMPM: Tag Manager is not found and thus will not be used
dalvikvm: GC_FOR_ALLOC freed 270K, 9% free 3568K 3908K, paused 18ms, total 18ms
我有使用collection.Formula1和collection.Formula2的代码。当我使用aspose.cells 8.x时,现在已经破坏了。如何在新版本的aspose中实现相同的目标?
答案 0 :(得分:1)
我担心,你的要求并不是很清楚,但是,我从你的片段中理解的是你正在读取应用于单元格的条件规则并尝试将其复制到另一个条件。如果我理解正确,那么您可以使用Cell.GetValidation方法检索特定单元格的验证规则,该规则又包含Formula1& Formula2属性。请查看以下代码以便更好地理解。
var book = new Workbook(dir + file);
var sheet = book.Worksheets[0];
var cell = sheet.Cells["A1"];
var validation = cell.GetValidation();
int index = sheet.ConditionalFormattings.Add();
var collection = sheet.ConditionalFormattings[index];
index = collection.AddCondition(FormatConditionType.Expression, OperatorType.None, validation.Formula1, validation.Formula2);
那就是说,如果您仍然遇到任何困难,或者我对您所呈现的场景的理解不正确,那么我谦卑地请求您分享您的代码的工作副本(使用之前的版本,没有任何问题)以及Aspose.Cells support forum中的支持电子表格,以便进行彻底调查。
注意:我在Aspose担任开发人员传播者。
@NSN,我修改了代码如下。请试一试。
var book = new Workbook(dir + "book1.xlsx");
var sheet = book.Worksheets[0];
var cell = sheet.Cells["A1"];
FormatConditionCollection [] formatConditions = cell.GetFormatConditions();
var formatCondition = formatConditions[0];
int index = sheet.ConditionalFormattings.Add();
var collection = sheet.ConditionalFormattings[index];
index = collection.AddCondition(FormatConditionType.CellValue, OperatorType.Between, formatCondition[0].Formula1, formatCondition[0].Formula2);
collection.AddArea(CellArea.CreateCellArea("B1", "B2"));
collection[0].Style.Borders[BorderType.BottomBorder].LineStyle = CellBorderType.Thick;
collection[0].Style.Borders[BorderType.BottomBorder].Color = Color.Red;
book.Save(dir + "output.xlsx");