Вставьте в класс ComExcelDocument_RU следующий метод и вызывайте его. Этот метод защищает все листы документа от всего, в том числе и от копирования.
PHP код:
void DD_Protect()
{
com app, activeSheet, activeWindow, sheets;
int i, shCount;
;
app = this.getApplication();
sheets = app.sheets();
shCount = sheets.count();
for (i = 1; i <= shCount; i++)
{
activeSheet = sheets.Item(i);
activeSheet.protect(
"gh1h5kl9o07df53", //password
true, //DrawingObjects
true, //Contents
true, //Scenarios
true, //UserInterfaceOnly
true, //AllowFormattingCells
true, //AllowFormattingColumns
true, //AllowFormattingRows
true, //AllowInsertingColumns
true, //AllowInsertingRows
true, //AllowInsertingHyperlinks
true, //AllowDeletingColumns
true, //AllowDeletingRows
true, //AllowSorting
true, //AllowFiltering
true //AllowUsingPivotTables
);
activeSheet.enableSelection(-4142); //xlNoSelection
}
activeWindow = app.activeWindow();
activeWindow.displayGridLines(false);
}