Excel.Application class

https://docs.microsoft.com/en-us/javascript/api/excel/excel.application?view=office-js

Represents the Excel application that manages the workbook.

API set: ExcelApi 1.1 ]

Extends

OfficeExtension.ClientObject

Properties

calculationMode
Returns the calculation mode used in the workbook, as defined by the constants in Excel.CalculationMode. Possible values are: Automatic, where Excel controls recalculation; AutomaticExceptTables, where Excel controls recalculation but ignores changes in tables; Manual, where calculation is done when the user requests it.

API set: ExcelApi 1.1 for get, 1.8 for set ]

Methods

calculate(calculationType)
Recalculate all currently opened workbooks in Excel.

API set: ExcelApi 1.1 ]

load(option)
Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.

suspendApiCalculationUntilNextSync()
Suspends calculation until the next "context.sync()" is called. Once set, it is the developer‘s responsibility to re-calc the workbook, to ensure that any dependencies are propagated.

API set: ExcelApi 1.6 ]

toJSON()

Property Details

calculationMode

Returns the calculation mode used in the workbook, as defined by the constants in Excel.CalculationMode. Possible values are: Automatic, where Excel controls recalculation; AutomaticExceptTables, where Excel controls recalculation but ignores changes in tables; Manual, where calculation is done when the user requests it.

API set: ExcelApi 1.1 for get, 1.8 for set ]

TypeScriptCopy

Property Value

Excel.CalculationMode | "Automatic" | "AutomaticExceptTables" | "Manual"

Method Details

calculate(calculationType)

Recalculate all currently opened workbooks in Excel.

API set: ExcelApi 1.1 ]

TypeScriptCopy

Parameters

calculationType
Excel.CalculationType

Specifies the calculation type to use. See Excel.CalculationType for details.

Returns

void

Examples

JavaScriptCopy

load(option)

Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.

TypeScriptCopy

Parameters

option
string | string[]

A comma-delimited string or an array of strings that specify the properties/relationships to load.

Returns

Excel.Application

Remarks

In addition to this signature, this method has the following signatures:

load(option?: { select?: string; expand?: string; }): Excel.Application - Where option.select is a comma-delimited string that specifies the properties/relationships to load, and options.expand is a comma-delimited string that specifies the relationships to load.

load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.Application - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items.

Examples

JavaScriptCopy

suspendApiCalculationUntilNextSync()

Suspends calculation until the next "context.sync()" is called. Once set, it is the developer‘s responsibility to re-calc the workbook, to ensure that any dependencies are propagated.

API set: ExcelApi 1.6 ]

TypeScriptCopy

Returns

void

toJSON()

TypeScriptCopy

Returns

Excel.Interfaces.ApplicationData

原文地址:https://www.cnblogs.com/jaww/p/9534795.html

时间: 2024-10-09 17:30:02

Excel.Application class的相关文章

Dynamics AX 2012 R2 无法创建类"Excel.Application"的COM对象

    Reinhard在做一个Excel导入项目时,发现X++代码一旦执行到Excel组件部分,就会报如下错误: 无法创建类"Excel.Application"的COM对象.请确保在计算机""上已正确注册该对象.     根据错误提示,我们先去组件服务中,查找名为Microsoft Excel Application的COM组件.     Reinhard并没有在COM组件列表中,找到该COM组件.我们知道,Microsoft Excel Application

Excel.Application SaveAs 把excel转换为html

Excel.Application SaveAs 中的第二个参数的值: 可以直接用 10 进制的值代替左边的这些 xl 类型 . 例如:把excel转换为html的js: var oWB = oXL.Workbooks.open("d:\test.xls"); oWB.worksheets(i).select(); var oSheet = oWB.ActiveSheet; oSheet.SaveAs("d:\test.html",44); fileformat 类

Excel.Application: Save as 之文件类型

Excel.Application SaveAs 中的第二個參數的值: 可以直接用 10 进制的值代替左边的这些 xl 类型 . fileformat 类型         十进制值   具体文件类型 xlAddIn 18 Microsoft Excel 2007 Add-In xlAddIn8 18 Microsoft Excel 97-2003 Add-In xlCSV 6 CSV xlCSVMac 22 Macintosh CSV xlCSVMSDOS 24 MSDOS CSV xlCSV

在64位系统中无法看到Microsoft Excel Application的问题(二)

之前碰到的那个问题,当操作系统是windows server 2012(不是R2),安装office 2007后在组件服务中看不到Microsoft Excel Application.即使用mmc comexp.msc /32在32位模式下运行组件服务也看不到. (此外还有一种情况也有这个问题:操作系统是windows server 2008 R2 Datacenter,安装office 2010) 经过检查发现需要通过修改注册表来解决这个问题: 1. 打开注册表编辑器regedit 2. 找

在64位系统中无法看到Microsoft Excel Application的问题

之前遇到一个问题,在Windows Server 2012 R2系统的[组件服务]->[DCOM]中看不到Microsoft Excel Application,重新安装Office问题依旧. 原因: 在Windows Server 2012 R2的x64环境中是无法管控以x32来执行的DCOM的,也就是说MMC跑在x64模式下,无法控制x32模式下运行的DCOM. 如果你打开Excel,可以看到Excel是运行在32位模式下 直接从[控制面板]中打开[组件服务]这时MMC是以64位模式运行的,

C#操作Office- Cannot find the interop type that matches the embedded interop type 'Microsoft.Office.Interop.Excel.Application'

网上说 2003 -> 11.0, 2007 -> 12.0. 因为平时提示"Are you missing an assembly reference?",都是没有引用库文件,但是明明我已经添加好引用了,还是报错.机器上安装的是Office2010,但是在库引用中,v14.0的是不行,Office 2010中的 Excel还是用v12.0. 处理题目中的错误,是将库文件中的"Embedded Interop Type"属性设置为false即可.(突然记

Excel.Application使用手册

Excel.Application组件使用方法,适合应用于使用EXCEL组件做WEB应用开发. 转自http://bbs.xtjc.com/thread-376095-1-1.html 定制模块行为(1) Option Explicit '强制对模块内所有变量进行声明 Option Private Module '标记模块为私有,仅对同一工程中其它模块有用,在宏对话框中不显示 Option Compare Text '字符串不区分大小写 Option Base 1 '指定数组的第一个下标为1(2

Excel Application操作指南

概述 Application对象是Microsoft Office Excel 2007对象模型中最高级别的对象,表示Excel程序自身.Application对象提供正在运行的程序的信息.应用于程序实例的选项以及实例中打开的当前对象.因为它是对象模型中最高的对象,Application对象也包含组成一个工作簿的很多部件,包括如工作簿.工作表集合.单元格以及这些对象所包含的数据等. Application对象包括: 程序范围的设置和选项.这些选项大部分同"工具"菜单下的"选项

vbs操作excel

航天金税系统升级,导出的Excel文件格式与原来有的差异,老的数据导入程序识别不了该文件,对比了新老文件后,发现新文件在专票和普票的“份数”行前增加了一行,同时增加了“单据号”列,通过脚本 把这些删除. 1 SetNewFormat("C:\Users\gukajie\Desktop\增值税专普发票数据导出20150619.xls") 2 3 Function SetNewFormat(filename) 4 Dim Ex, Wb, Sht 5 Dim LastRow, r 6 Dim