Home > Domino Tips > Developer > LotusScript > Secure Microsoft Excel spreadsheets with LotusScript
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

LOTUSSCRIPT

Secure Microsoft Excel spreadsheets with LotusScript


Prasad Krishnapillai
02.22.2007
Rating: -2.20- (out of 5)


Lotus Notes and Domino tips, tutorials and how-to articles
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Want to protect Microsoft Excel spreadsheets from tampering? This LotusScript code only allows users to edit columns that you specify as permitted. Other columns can be locked programmatically, and the Microsoft Excel file will be protected with a password. The only way for the secured columns to be edited is for the user to know the password and edit them after entering it.
'Setting the Excel object.  
 
Set ExcelApp = CreateObject("Excel.Application")
Set ExcelWorkbook = 
ExcelApp.Workbooks.Open("C:TempTest.xls") 
Set ExcelWorksheet = 
ExcelWorkbook.Application.Workbooks(1).Worksheets(1)
' You can enter the values and once 
the entry is over lock the columns.
With ExcelWorksheet 
' .Range("A1:B1").Select
.Range("A1").Value ="Prasad"
.Range("B1").Value ="Lekshmi"
.Range("A1:B1").Locked=True
.Range("A2:A10").Locked=False  
End With
ExcelWorksheet.Protect Password="1234" 
'  You just need one line to protect excel sheet from tampering.
ExcelWorkbook.Save
ExcelApp.quit  
Set ExcelApp=Nothing

Do you have comments on this tip? Let us know.

Related information from SearchDomino.com:

  • Featured Topic: LotusScript and Excel
  • Learning Guide: LotusScript
  • FAQ: LotusScript advice
  • Reference Center: LotusScript tips and resources

    This tip was submitted to the SearchDomino.com tip library by member Prasadknair . Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

    Rate this Tip
    To rate tips, you must be a member of SearchDomino.com.
    Register now to start rating these tips. Log in if you are already a member.




    Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



    RELATED CONTENT
    LotusScript
    LotusScript finds the first occurrence of a string from the right
    Clear Recent Contacts view and prevent repopulation in Lotus Notes 8.x
    Search Microsoft Active Directory with LotusScript
    Three steps to trap and handle save conflicts with LotusScript
    Troubleshoot agents by displaying LotusScript variables online
    LotusScript sorts lists alphabetically
    Run or restart Notes/Domino agents via text messages
    LotusScript code rebuilds corrupted busytime.nsf file
    Soft-code item names to facilitate LotusScript management
    LotusScript agent automates selective mail file replication

    Lotus Notes Domino User Settings
    Secure Lotus Notes/Domino 8.x from mail to unknown recipients
    How to turn off the message recall feature in Lotus Notes 8
    Domino server setting and email policy tricks admins must know
    Top 10 Lotus Notes/Domino administration tips of 2008
    Synchronize LinkedIn contacts with Lotus Notes Domino
    Setting up local replication of a Lotus Notes database for offline employees
    Programmatically create a shortcut for Lotus Notes
    How to create a comments field for Lotus Notes documents
    The truth about AutoSave in Lotus Notes/Domino 7
    Restraining the monsters behind Lotus Notes' 'Full Access Administrator'

    Lotus Notes Domino Access, Permissions and Authentication
    Display Lotus Notes user group membership details in a tree view
    How DirLint verifies data in Lotus Notes Domino 8 directories
    Fix and update Lotus Notes documents with limited access
    Lotus Notes access error: 'database is not opened yet'
    Formula language button manages Deny Access list searches
    Update the ACL from the Roles view with LotusScript
    Secure Lotus Notes 8 with the Internet password lockout feature
    Find a Lotus Notes user within NAB Deny Access groups
    Move a Lotus Domino server to a new certifier without a reinstall
    Troubleshoot Lotus Notes Out of Office (OOO) agent error messages

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary

    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



  • Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
    HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




    All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts