behaviour of Excel template as "read only" in a DOS script versusTemplate Icon

  • Thread starter Thread starter George Lewycky
  • Start date Start date
G

George Lewycky

Hello everyone,

I have an excel "template" (.xlt) shown below which I made read-only
so the users cannot save over the template and also imports a pre-
define filename "FC_Excel.txt".

When I run the template via the icon or shortcut it works fine and
even defaults to "workbook" protecting the template which is what I
want so the user cant override the template.


But, I have a script which merges, manipulates and sorts the
text file "FC_EXCEL.txt" to prepare it for the template as shown below
in the DOS script which I also have starting Excel with the template
works but now defaults to "template" instead of WORKBOOK when using an
ICON or SHORTCUT.


sort /+2 c:\FC_MERGE.txt | findstr /C:"$" > FC_EXCEL.txt
start EXCEL.EXE "c:\Download Template_Oct20_mmddyy.xlt"



I found these sites which talk about starting Excel with switches and
arguments which I will be testing out but I don’t see anything related
to my issue.

http://www.tek-tips.com/faqs.cfm?fid=1371

http://www.techtalkz.com/windows-xp/118035-start-run-something.html

http://www.pcreview.co.uk/forums/thread-1899223.php


Any Ideas or suggestions greatly appreciated


TIA

George Lewycky
 
Hi,

You must open the template from inside of Excel. what you are doing in your
script is the same as choosing File, Open rather than File, New. In Excel if
the users opened the file using File Open they would be able to edit the
template and save it back as a template by default.

You may be able to write dos script which will open it as a regular file,
but that is not my area of expertise.
 
Hi Shane,

please elaborate what you mean by "open as a regular file" ??
Dont refer to it as a template ? Excel will figure that out
automatically ?

George
 
Back
Top