Santana Posted October 1, 2010 Posted October 1, 2010 Hi guys,I was assigned a project where upper management will log in to a form and make a request for reports. then my unit will create the report ans save it on a network shared directory. I though about having a MS Access Database with 3 forms (request, upload and report viewer/search)Management will fill out the request form form and when they save/close the form, an email is sent to our unit with a generated projectid and requestor email information. we will then create the report, open the upload form which will move the report to a shared directory with a new filename and store a link on a table field.By using the projectid and the requestor email information, an email is autogenerated advising that the report is available for reviewThe requestor will then login and review the report.My challenge is that my boss wants the files protected from being edited. I thought about pdf. However, most files are too wide to fit into a single page which eliminates this approach.I wonder if there is a way to (from Autoit) open or move a file, protect all the cells and assign passwords to unprotect, then save the file. This way dont have to manually protect files before they're moved to the shared directory.I will really appreciate any input. Just another special date with a different challenge
water Posted October 1, 2010 Posted October 1, 2010 This protects all sheets in a workbook: #include <excel.au3> $oExcel = _ExcelBookOpen("C:\temp\test.xls") For $oSheet In $oExcel.ActiveWorkbook.Worksheets $oSheet.Protect("Test") ; Protect ; $oSheet.UnProtect("Test") ; Unprotect Next _ExcelBookSave($oExcel) Exit My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Santana Posted October 1, 2010 Author Posted October 1, 2010 Water, Thanks for the reply. There is another situation, the excel reports are divided by tabs in the workbook and tabs. Each tab is a subsection of the same report and it contains the title for the specified tab (and that is unknown to the user uploading the files). Can we include a way to identify each tab by its name? I see that the sample code include a tab named "test". Is there any way to retrieve the name of each tab so we can supply it in the script as an argument? Thanks again Just another special date with a different challenge
water Posted October 1, 2010 Posted October 1, 2010 (edited) ... I see that the sample code include a tab named "test" ...The example code protects/unprotects all sheets of the test.xls worksheet.What you see in the code as "test" is the password to protect/unprotect the sheet.What do you mean by "tab" - the sheets the workbook consists of? Edited October 1, 2010 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Santana Posted October 1, 2010 Author Posted October 1, 2010 Yes. I wrote tabs by I meant worksheet. I will give it a try and see. Just another special date with a different challenge
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now