|How to ...|
|Using linked workbooks|
|Save Workbook as unprotected file|
Working with locked linked workbooks.
This sample describes the most common case, with linked workbooks:
So, we've added 3 files to this project:
MainWorkbook.xls and LinkedWorkbook.xls - are linked files, LinkedWorkbook has reference to MainWorkbook and MainWorkbook has reference to LinkedWorkbook. MainWorkbook.xls opens Data.xls located in same folder and copies range from this workbook to itself. This operation is assigned to Load Input Values from Data.xls button.
This project has Hardware Based Activation Code protection option.
|You can convert all linked files to executables or lock then as usual Excel documents - linked workbooks work in both cases. Edit Links command finds linked workbook even it is locked as application. If some of your linked files should be opened separately - convert each of them to application.|
Primary file MainWorkbook.xls which should be opened by customer is converted to application. Other files are converted to usual Excel documents.
To keep links, locked files should have same names. So we've create Output sub-folder for all locked files in our project.
The only modification we should make - is a code, which opens locked workbook:
Method GetApplicationPath returns folder, where locked application is located. If workbook is not locked it returns folder of this workbook.
Locked linked files work in same way as usual linked spreadsheets. We should not do any modifications to make locked files working.
This project and all files (locked and unlocked ones) can be downloaded from our website using this link lockxls_samples.msi.