Hello
Do you want to add static row below standard header ?
for what format ? XLS? CSV?
Hi!
A static row above the header in csv format
Please, add this code to section “Misc Settings” and tweak it
add_action( "woe_before_csv_print_header", function($handle, $data, $formater){
fputcsv($handle, array("text","another text","","4th column"));
},10,3);
Wooow works perfect! Thank you so much!
Could you leave me the code for the XLS format too? I would be grateful.
And one last query: Can the rows be combined?
Cheers!
*Combine text from two or more cells into one cell
Ok, this code works fine! but I can’t combine cell A1 with cell B1 into single cell. 🙁
add_action( 'woe_xls_print_header', function($objPHPExcel, $formater ) {
$objPHPExcel->getActiveSheet()->insertNewRowBefore(1); //1 lines above header
$formater->last_row = 2 ; //2 rows
$objPHPExcel->getActiveSheet()->setCellValue( "A1", "Cell1:" );
$objPHPExcel->getActiveSheet()->setCellValue( "B1", "" );
$objPHPExcel->getActiveSheet()->setCellValue( "C1", "Cell2" );
$objPHPExcel->getActiveSheet()->setCellValue( "D1", "" );
},10,2);
-
This reply was modified 2 years, 8 months ago by
fedehrc.
try
$objPHPExcel->getActiveSheet()->mergeCells( "A1:B1");
Yesssss!! Thank you so much!!