如何使用Delphi的readwrite密码创build一个.xls文件
我知道可以使用ADO创build.xls文件,使用Excel创buildOLE自动化,甚至使用多个商业库。
我现在要求的不仅仅是创build一个新的.xls文件并向其中添加数据,而且还要用密码来防止编辑。
我想这将是可能的使用OLE自动化,但这将需要在计算机上的Excel安装,也添加所有我想避免的OLE自动化的潜在麻烦。
其他解决scheme是否提供密码保护文件的选项?
(是的,我知道这是远远不够的,但客户要求,以防万一:我使用delphi2007)
此页面来自NativeExcel Suite:Protect方法的帮助文件
Protects a workbook so that it cannot be modified. Syntax procedure Protect(); procedure Protect( Password : string); Password Optional string. A string that specifies a case-sensitive password for the workbook. If this argument is omitted, you can unprotect the workbook without using a password . Otherwise, you must specify the password to unprotect the workbook. Example This example sets the password for the workbook. workbook.Protect('mypass123');
NativeExcel对我来说工作得非常好。
- 在Delphi中为Excel编写一个DLL
- OLE Excel输出中的国际date格式问题
- C ++ Builder DBGrid在xlsx文件中导出到Excel
- 当从TOleContainer提取文档的数据时,DoVerb(ovInplaceActivate)崩溃,出现各种错误消息
- Delphi和Excel.FormatConditions
- Exceltypes库/delphi2009 /坏variablestypes
- 用Delphi AdoTable / Grid编辑/更新Excel表格
- 运行带有嵌套var访问的Delphi程序后,Excel.exe仍然会被加载
- Delphi Excel OLE Chart数据标签问题