Solved

Read only Excel Property Using Lotus Script

Posted on 2010-09-04
6
1,006 Views
Last Modified: 2013-12-18
Experts,

I am use Lotus Script to collect fields from selected and populate a specific Excel template. The report is meant to be a raw data export and I was hoping to add a read-only property to this file save entry. Can anyone help?
      
'identify and save the file
      x1App.ActiveWorkbook.SaveAs "H:\Data\"+ db.Title + " on " +RServer(0) + "_" + RDate +".xls"
      x1App.Application.ActiveWindow.Close (False)
      
      x1App.Application.Quit
      Set x1App=Nothing
0
Comment
Question by:mcjann
  • 2
6 Comments
 
LVL 22

Expert Comment

by:mbonaci
ID: 33605452
All you can do to protect excel sheet is to use built-in protect worksheet option:

http://msdn.microsoft.com/en-us/library/dkcs53f3(VS.80).aspx
http://msdn.microsoft.com/en-us/library/aa174285(office.11).aspx


See here for previous Excel versions:
http://www.experts-exchange.com/Q_21622231.html
This is the correct link for Office 2003 (the one in the accepted comment doesn't work):
http://msdn.microsoft.com/en-us/library/aa204840(office.11).aspx
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 33611904
YOu can add a Read-only recommended property using the SaveAs method, or you can actually set the file attributes (it would be SetAttr in VBA).
0
 
LVL 22

Expert Comment

by:mbonaci
ID: 33936259
Since we haven't received any response, I'm not really sure if my answer is what he really wanted to do...
When I read it now, it seems that rorya was on the right track.
0
 
LVL 24

Expert Comment

by:broomee9
ID: 34026892
This question has been classified as abandoned and is being closed as part of the Cleanup Program.  See my comment at the end of the question for more details.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now