到目前还没有一个人能够给出一个好的方法,没有高手吗?电脑上没有安装Office,怎样用Delphi打开Office 系列(word,excel,ppt)并能预览

直接把Excel当城数据库用ADO就可以连接
ConnectionString=Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=C:/Documents and Settings/Administrator/My Documents/Book1.xls;
Extended Properties=Excel8.0;Persist Security Info=False
就可以连通,然后每一页相当于一个表
用SQL语句如: select * from $Sheet1 where ...就可以得到数据到DBGrid,
然后就可以随便处理了
 
To 沙_儿:
找不到表sheet1。
此方法不通。
 
关注,楼主的标题是“[h3][red]电脑上没有安装Office[/red][/h3]
 
你看看下面这个简介就能够明白怎样做了!那就是自己分析相关的文件格式,然后显示或其它处理
简介:
Excel读写控件是用友华表公司近期推出的一款非可视控件,用于操作Excel文件内容。企业应用软件最
后输出结果是报表,对很多用户而言,他们希望该报表能够转化到Excel文件中。目前技术人员读写Exc
el文件可以采用ODBC接口,Excel VBA宏及直接分析Excel文件格式等方法,前两种方法功能弱,不能获
取Excel文件的所有细节,而且运行环境复杂,例如需要配置ODBC驱动及安装合适版本的Excel软件。华
表公司开发的Excel读写控件采用直接分析Excel文件格式的方法,可以获取Excel文件的所有细节,并
且机器上不需要安装Excel软件,尤其适合BS结构的企业应用软件(这样客户端配置很简单,仅需下载
一个控件即可,不用配置ODBC驱动及VBA运行环境)。
Excel读写控件支持Excel 5.0, 7.0, Excel 97, Excel 2000 等文件格式。
可在VB,VC,Visual Foxpro, Delphi, C++ Builder, PowerBuilder等工具下使用
也可在html,asp,php,jsp语言下使用
 

我试了一下Excel读写控件,老是错误,无法使用
 
目前还没人能够回答对。
请各位帮帮我了!
 
还是用ADO方式把EXECL当成是数据库打开得好.
每一个Sheet就是一个表.我把数据库导出到EXECL就是这样实现的
 
to wr960204:
“用ADO方式把EXECL当成是数据库”这个方法我试过,但是读出来的数据没有格式,象EXCEL里
文本的颜色、字体的大小,对齐方式,还有如果EXCEL里有图片,用ADO都不能正确读。
 
pdf
需装载active控件
 
你这个问题,不是300分能搞定的,如果300分能搞定,市面上一定会有好多类似OFFICE的软件

你就是出3000000分,也不会有完满的解决。

首先要知道到什么样的问题问的合理!

要读取OFFICE的文件,至少要过两个关:结构化存储、TRF格式解析。这都不是很容易的。
何况还有如何显示的问题。
为什么WPS一直不能兼容WORD?容易么!
 
To hfghfghfg:
你所说的用F1Book和Pdf控件都不行的。我所要求的是要在没有安装Office和pdf阅读器的电脑上
能够正常打开Office系列文件和pdf文件,而这两个控件是要在安装Office和pdf后才可以用的,不信你
试试?
To wk_knife:
我虽然不知道怎么读出来,但也不会象你说的那么难。你用过PageManager吗?(在http://www.newsoftinc.com/上有)
这个软件是能够在没有安装Office和pdf阅读器上能够正确读出Office系列文件和pdf文件。


 
F1Book的帮助你没看?????????

 
Version 3.0 of Formula One provides a variety of new features. Among the new features provided by this version:

OCX Support. Formula One functionality is available through OCX properties and methods.
Enhanced Excel Support. Version 3.0 provides a number of new and improved features that make Formula One even more Excel-compatible such as:
Excel 5.0 support. Formula One can now read and write Excel 5.0 files.
Workbooks. Support for Excel-type multiple sheet workbooks. This means that Formula One supports 3-D cell referencing (Sheet1:Sheet5!A1:C10.) Additionally, many worksheet editing methods such as InsertRange, DeleteRange, MoveRange
, etc. can work on multiple worksheets at the same time. This time-saving feature keeps you from having to perform the same over and over in your code to modify a series of worksheets.

Cell References. Formula One can now parse range references with . or . . in addition to :(A1:B2 or A1.B2 or A1..B2)
Entering Text. You can now use a leading apostrophe (’) to enter numbers as text.
New Worksheet Functions. The worksheet functions SUMIF, COUNTIF, CONCATENATE, ROUNDUP and ROUNDDOWN have been added to this version in enhance Excel 5 compatibility.

Connection to ODBC databases. By using the new ODBCConnect, ODBCQuery, and ODBCDisconnect methods, you can retrieve information from an ODBC database and place it in your Formula One workbook.
New Built-In Chart Object. You can now select a range of data, click on the chart tool, and draw a First Impression chart on your worksheet.
Built-In DLL. In this version of Formula One, the DLL is built directly into the OCX. The only file you have to distribute with your application is VCF132.OCX. (MFCANS32.DLL and OC30.DLL must also be present.)

Validation Rules. You can now create validation rules to ensure users enter appropriate data in cells. Validation rules include a formula against which to test the cell entry and a message to be displayed if validation fails. There is also a new
ValidationFailed event to allow you to program a response when validation fails.
AutoFill Feature. Formula One now provides the ability to autofill worksheet cells with common lists such as month names and days of the week. You can also add your own autofill lists.
 
regsvr32
应该会吧
 
To hfghfghfg:
F1Book只能打开Execl5,现在Execl都2000了。格式打不开。
肯定是要用到regsvr32进行注册的,但你要如何用呢?要注册那些文件呢?
 
其实最简单方便的方法还是让客户安装Office。
自己分析文件格式?花大心思可能成,如果Office升级的话,你就重复劳动吧!这种
事还是劝大家省省吧!
BTW:你的软件卖多少?这样做值吗?如果是凭兴趣研究研究还可以。[?]
 
F1Book只能打开Execl5,现在Execl都2000了。格式打不开。
//delphi自带的F1Book(3.04) 是这样的,不过据说高版本的可以

肯定是要用到regsvr32进行注册的,但你要如何用呢?要注册那些文件呢?
//Built-In DLL. In this version of Formula One, the DLL is built directly into the OCX. The only file you have to distribute with your application is VCF132.OCX. (MFCANS32.DLL and OC30.DLL must also be present.)
 
顶部