使用密码加密excel文件而不是只读 [英] encrypt an excel file with password without read only

查看:97
本文介绍了使用密码加密excel文件而不是只读的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。

我需要excel工作簿的save as命令才能使用密码保存文件
但不允许只读

I need the save as command of an excel work book in order to save a file with a password but dont allow read only.

只有输入密码才能打开文件。

Only if you put the password you can open the file.

我正在使用Microsoft.Office.Interop.Excel

I am using Microsoft.Office.Interop.Excel

这是我现在正在使用的命令,但如果按下只读,我可以打开以查看输入:

this is the command that i am using now but i can open to see the input if i press read only:

MyApp.ActiveWorkbook.SaveAs(path,Microsoft.Office.Interop.Excel.XLFileFormat.xlOpenXMLWorkbook,Type.Missing,MyPassword)

MyApp.ActiveWorkbook.SaveAs(path,Microsoft.Office.Interop.Excel.XLFileFormat.xlOpenXMLWorkbook,Type.Missing,MyPassword)

推荐答案

你好tom,



这是Visual C#论坛。由于您的问题与MS Excel有关,我将您的主题移至MS Excel论坛以获得快速回复。



您的理解与合作将不胜感激。
Hi tom,

This is Visual C# forum. As your issue is related to MS Excel I am moving your thread to MS Excel forum for getting quick response.

Your understanding and cooperation will be grateful.


这篇关于使用密码加密excel文件而不是只读的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆