DAP exporting to excel as read-only

Batten

New member
Local time
Today, 18:09
Joined
Aug 7, 2008
Messages
7
I have a DAP set up with a Pivottable. The user of the DAP can click on the export to excel button to export the detail to excel. My question is as follows:

When the detail/Pivot is exported to excel it must be a read-only file in excel to force the user to save it as a different excel file

Is it possible to make the export a read-only file?

Thanks

Ralph
 
It depends how your doing it.

If your opening an existing workbook then you can set the read only property when you open it, if your creating a new workbook then no you can't specify that it is readonly.
 
I have a DAP set up with a Pivottable. The user of the DAP can click on the export to excel button to export the detail to excel. My question is as follows:

When the detail/Pivot is exported to excel it must be a read-only file in excel to force the user to save it as a different excel file

Is it possible to make the export a read-only file?

Thanks

Ralph
I wonder if it is possible to save it as an XLT file (Excel template) which would force the user to save it under a different filename. I don't know.

Another possibility (not sure it will work), after it is saved, is to add a reference to Windows Scripting host and use the File System Object.


Dim fso as New Iwsh.FileSystemObject
Dim fil as IWsH.File
Set fil = fso.GetFile(stringPathToExcelFile)
fil.Attributes = fil.Attributes OR ReadOnly


On a bitmask, as you probably know, an "OR" is used to add an attribute.
 

Users who are viewing this thread

Back
Top Bottom