Aspose.Cells 8.6.3
来源:互联网 发布:数据库实用教程 编辑:程序博客网 时间:2024/05/17 21:42
引用包后,在第一次调用前,执行以下方法就可以正常使用了。
internal static void InitializeAsposeCells(){ const BindingFlags BINDING_FLAGS_ALL = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance; const string CLASS_LICENSER = "\u0092\u0092\u0008.\u001C"; const string CLASS_LICENSERHELPER = "\u0011\u0001\u0006.\u001A"; const string ENUM_ISTRIAL = "\u0092\u0092\u0008.\u001B"; const string FIELD_LICENSER_CREATED_LICENSE = "\u0001"; // static const string FIELD_LICENSER_EXPIRY_DATE = "\u0002"; // instance const string FIELD_LICENSER_ISTRIAL = "\u0001"; // instance const string FIELD_LICENSERHELPER_INT128 = "\u0001"; // static const string FIELD_LICENSERHELPER_BOOLFALSE = "\u0001"; // static const int CONST_LICENSER_ISTRIAL = 1; const int CONST_LICENSERHELPER_INT128 = 128; const bool CONST_LICENSERHELPER_BOOLFALSE = false; //- Field setter for convinient Action<FieldInfo, Type, string, object, object> setValue = delegate(FieldInfo field, Type chkType, string chkName, object obj, object value) { if ((field.FieldType == chkType) && (field.Name == chkName)) { field.SetValue(obj, value); } }; //- Get types Assembly assembly = Assembly.GetAssembly(typeof(Aspose.Cells.License)); Type typeLic = null, typeIsTrial = null, typeHelper = null; foreach (Type type in assembly.GetTypes()) { if ((typeLic == null) && (type.FullName == CLASS_LICENSER)) { typeLic = type; } else if ((typeIsTrial == null) && (type.FullName == ENUM_ISTRIAL)) { typeIsTrial = type; } else if ((typeHelper == null) && (type.FullName == CLASS_LICENSERHELPER)) { typeHelper = type; } } if (typeLic == null || typeIsTrial == null || typeHelper == null) { throw new Exception(); } //- In class_Licenser object license = Activator.CreateInstance(typeLic); foreach (FieldInfo field in typeLic.GetFields(BINDING_FLAGS_ALL)) { setValue(field, typeLic, FIELD_LICENSER_CREATED_LICENSE, null, license); setValue(field, typeof(DateTime), FIELD_LICENSER_EXPIRY_DATE, license, DateTime.MaxValue); setValue(field, typeIsTrial, FIELD_LICENSER_ISTRIAL, license, CONST_LICENSER_ISTRIAL); } //- In class_LicenserHelper foreach (FieldInfo field in typeHelper.GetFields(BINDING_FLAGS_ALL)) { setValue(field, typeof(int), FIELD_LICENSERHELPER_INT128, null, CONST_LICENSERHELPER_INT128); setValue(field, typeof(bool), FIELD_LICENSERHELPER_BOOLFALSE, null, CONST_LICENSERHELPER_BOOLFALSE); }}
目前已支持到9.0版本
Aspose 官网:http://www.aspose.com/
Aspose.Cells 官网:http://www.aspose.com/.net/excel-component.aspx
0 0
- Aspose.Cells 8.6.3
- Aspose.Cells
- Aspose.Cells 使用整理
- Aspose.Cells教学视频
- Aspose.Cells简单用法
- Aspose.Cells中文版文档
- Aspose.Cells 使用汇总
- Java Aspose Cells
- aspose.cells基础使用
- itextsharp、Aspose.Words、Aspose.Cells联合使用
- Aspose.Cells使用方法总结大全
- Aspose.Cells使用教程大全
- Aspose.Cells处理EXCEL数据
- 使用Aspose.Cells生成Excel
- Aspose.Cells区域格式设置
- Aspose.Cells Excel删除行
- Aspose.Cells.dll的运用
- Aspose.Cells基础使用方法整理
- 软件设计之——“高内聚低耦合”
- 【剑指offer】异或去重
- Git 和 SVN的区别总结
- Android 5.1 添加硬件抽象层(HAL)和JNI接口总结
- 待整理。。。blob。。。从页面存图片到数据库或本地的方法
- Aspose.Cells 8.6.3
- 悠着点
- Java关键字transient和volatile小结(转)
- VC:CString用法整理(转载)
- linux驱动模型开发——linux platform总线机制讲解与实例开发
- python第二次小练习
- linux下 部署免安装mysql
- 【剑指offer】约瑟夫环问题
- 九度OJ题目1015:还是A+B