Is there a possibility that i can access excel's file details?

Home / Uncategorized / Is there a possibility that i can access excel's file details?

Question:
$objPHPExcel->getProperties()->setCreator("Sample")
->setLastModifiedBy("Sample")
->setTitle("Office 2007 XLSX Test Document")
->setSubject("Office 2007 XLSX Test Document")
->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")
->setKeywords("office 2007 openxml php")
->setCategory("Test result file");
i have put password on cell, so that user cannot modify some of the cell value, but when a user copy all data and paste all data to a new excel file, i cannot verify the authenticity of the cell value anymore. so what i want to do is to compare two excel files if it is still the program generated file or created by user?


Answer:
You can e.g. create one extra sheet and sign him with hidden attribute. So when user copy and paste data, he doesn’t copy extra sheet, because he doesn’t know about him. Try explore SHEETSTATE_HIDDEN or SHEETSTATE_VERYHIDDEN like this
$Excel->getSheetByName(‘Hidden Sheet’)->setSheetState(PHPExcel_Worksheet::SHEETSTATE_HIDDEN);
Read more

Leave a Reply

Your email address will not be published. Required fields are marked *