没有合适的资源?快使用搜索试试~ 我知道了~
spreadsheet-api
4星 · 超过85%的资源 需积分: 50 24 下载量 129 浏览量
2011-02-11
14:43:43
上传
评论
收藏 3.1MB PDF 举报
温馨提示
试读
316页
Formula One ActiveXspreadsheet-api-and-engine.pdf
资源推荐
资源详情
资源评论
Using the e.Spreadsheet API
and Integrating the Engine
Information in this document is subject to change without notice. Examples provided are
fictitious. No part of this document may be reproduced or transmitted in any form, or by any
means, electronic or mechanical, for any purpose, in whole or in part, without the express
written permission of Actuate Corporation.
© 1995 - 2008 by Actuate Corporation.
All rights reserved.
Printed in the United States of America.
Contains information proprietary to:
Actuate Corporation
2207 Bridgepointe Parkway
San Mateo, CA 94404
www.actuate.com
www.birt-exchange.com
The software described in this manual is provided by Actuate Corporation under an Actuate
License agreement. The software may be used only in accordance with the terms of the
agreement. Actuate software products are covered by certain U.S. patents and patents pending.
Actuate Corporation trademarks and registered trademarks:
Actuate, the Actuate logo, BIRT, BusinessReports, Collaborative Reporting Architecture,
Correlink, Correlink Framework, e.Analysis, e.Report, e.Reporting, e.Spreadsheet,
Encyclopedia, Formula One, Interactive Viewing, Internet Spreadsheet, iPortal, Lens, Lens
Builder, Live Report Document, Nimble, the Nimble logo, Nimble Technology, Pace,
Performancesoft, Performancesoft Track, Performancesoft Views, ReportCast,
Report Encyclopedia, ReportingEngines, the ReportingEngines logo, Reportlet,
Spreadsheets Everywhere, Tidestone Technologies, and XML reports.
Actuate products may contain third-party products or technologies. Third-party trademarks or
registered trademarks of their respective owners, companies, or organizations include:
Apache Software Foundation (www.apache.org): Axis, Batik, Batik SVG library, Commons
Command Line Interface (CLI), Commons Codec, Derby, Struts, Tomcat, Xalan-J, Xerces, and
Xerces2 Java Parser. Bits Per Second, Ltd. and Graphics Server Technologies, L.P.: Graphics
Server. Bruno Lowagie and Paulo Soares: iText, licensed under the Mozilla Public License
(MPL). Castor (www.castor.org), ExoLab Project (www.exolab.org), and Intalio, Inc.
(www.intalio.org): Castor. Codejock Software: Xtreme Toolkit Pro. Component One, LLC.:
VSFlexGrid Pro. DataDirect Technologies Corporation: DataDirect JDBC, DataDirect ODBC.
Eclipse Foundation, Inc. (www.eclipse.org): Data Tools Platform (DTP) ODA, Eclipse SDK,
Graphics Editor Framework (GEF), and Eclipse Modeling Framework (EMF), licensed under
the Eclipse Public License (EPL). International Components for Unicode (ICU): ICU library.
Liferay (www.liferay.com): Liferay, licensed under the MIT License. Microsoft Corporation
(Microsoft Developer Network): CompoundDocument Library. Netscape Communications
Corporation, Inc.: Rhino, licensed under the Netscape Public License (NPL). Oracle
Corporation: Berkeley DB. Rogue Wave Software, Inc.: Rogue Wave library. Sam Stephenson
(prototype.conio.net): prototype.js, licensed under the MIT license. Sun Microsystems, Inc.:
JAXB, JDK, Jstl. World Wide Web Consortium (W3C)(MIT, ERCIM, Keio): Flute, JTidy, Simple
API for CSS. XFree86 Project, Inc.: (www.xfree86.org): xvfb.
All other brand or product names are trademarks or registered trademarks of their respective
owners, companies, or organizations.
Document No. 080131-2-961006 January 17, 2008
i
Contents
About
Using the e.Spreadsheet API and Integrating the Engine
. . . . . . .xiii
Chapter 1
About Actuate e.Spreadsheet SDK and Engine . . . . . . . . . . . . . . . . . . . . . 1
About Actuate e.Spreadsheet Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
About the e.Spreadsheet API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
About Actuate e.Spreadsheet Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Accessing data sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Exporting spreadsheet reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Creating a calculation engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Separating responsibilities by area of expertise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
About Actuate e.Spreadsheet Engine files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Deploying Actuate e.Spreadsheet Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
About Actuate e.Spreadsheet report design files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
About Actuate e.Spreadsheet Engine examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Chapter 2
Understanding the e.Spreadsheet API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
About the e.Spreadsheet API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Using a Javadoc API documentation package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Understanding the most commonly used classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
About the primary classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
About the utility classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
About the classes that JBook returns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
About exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
About the API constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Using a code example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Chapter 3
Working with workbooks and worksheets . . . . . . . . . . . . . . . . . . . . . . . . . 13
About working with worksheets and workbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Understanding the JBook class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Understanding the BookModelImpl class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Understanding the BookModel interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Getting other components from the BookModel object . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Understanding BookModel functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Understanding the Book interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Understanding the BookImpl class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Creating a workbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
ii
Creating a workbook in a Java Swing application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
Creating a servlet or an application without a user interface . . . . . . . . . . . . . . . . . . . . . . . . . .19
Resetting a workbook to default settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
Grouping workbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
Attaching workbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
Refreshing data in a workbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
Understanding multithreading issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
Working with worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
Understanding selected worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Understanding the active worksheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Creating worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Inserting worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
Manipulating worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
Manipulating worksheets through the BookModel interface . . . . . . . . . . . . . . . . . . . . . . . .24
Manipulating worksheets through the Sheet interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
Displaying a specific worksheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26
Deleting worksheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26
Selecting and deselecting a worksheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26
Hiding a worksheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
Chapter 4
Working with worksheet elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
About worksheet elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30
Working with a worksheet tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30
Working with rows and columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
Setting the first row or column to display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
Hiding or showing a column or row . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
Working with column widths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32
Setting the units of column width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32
Using automatic column sizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
Maintaining column width when importing data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
Freezing a row or a column . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
Determining the last row or column containing data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34
Working with headings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
Selecting a column or a row heading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
Getting and setting heading dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
Getting and setting heading text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
Supplying a multiline column or row heading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37
Setting heading font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37
Turning row or column headings off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
Working with a worksheet cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
Inserting cells into a worksheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
Selecting a cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40
iii
Making the active cell visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Selecting an entire row when selecting a cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Making multiple, non-contiguous selections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Enabling users to move the active cell by pressing the Enter key . . . . . . . . . . . . . . . . . . . . 41
Setting cell protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Merging cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Working with a range of cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Getting a cell reference for a range of cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Copying a range of cells from one worksheet to another . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Limiting visible rows and columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Disabling drag-and-drop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Clearing a range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Working with a worksheet outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Working with a worksheet scroll bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Chapter 5
Working with data sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
About data sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Getting a data source object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Casting the Source object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Setting the properties of the data source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Creating and setting a query object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Getting a DataRange object and setting its query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Formatting the report range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Using a stylesheet to format the report range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Generating the workbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Using a file data source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Creating a connection to a file data source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Using a URL to specify a file location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Using a delimited text file data source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Defining a fixed-width text file query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Setting connection information using a properties file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Setting report range options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Understanding the size of a report range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Understanding the insertion mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Adding field names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Adding row numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Adjusting column widths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Setting the fill-down option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Moving or deleting a report range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Using the data set cache data source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
剩余315页未读,继续阅读
资源评论
- zhuxqstyle2011-12-08资料不错,可惜是英文的。
- treemin2012-03-07打不开,怎么回的事
urlyun
- 粉丝: 0
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功