403Webshell
Server IP : 217.160.0.64  /  Your IP : 216.73.216.137
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : ws67269618 ( 67269618)
PHP Version : 8.4.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/kunden/proc/self/root/usr/share/doc/libspreadsheet-writeexcel-perl/examples/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/kunden/proc/self/root/usr/share/doc/libspreadsheet-writeexcel-perl/examples//merge4.pl
#!/usr/bin/perl -w

###############################################################################
#
# Example of how to use the Spreadsheet::WriteExcel merge_range() workbook
# method with complex formatting.
#
# reverse('�'), September 2002, John McNamara, jmcnamara@cpan.org
#

use strict;
use Spreadsheet::WriteExcel;

# Create a new workbook and add a worksheet
my $workbook  = Spreadsheet::WriteExcel->new('merge4.xls');
my $worksheet = $workbook->add_worksheet();


# Increase the cell size of the merged cells to highlight the formatting.
$worksheet->set_row($_, 30) for (1..11);
$worksheet->set_column('B:D', 20);


###############################################################################
#
# Example 1: Text centered vertically and horizontally
#
my $format1 = $workbook->add_format(
                                    border  => 6,
                                    bold    => 1,
                                    color   => 'red',
                                    valign  => 'vcenter',
                                    align   => 'center',
                                   );



$worksheet->merge_range('B2:D3', 'Vertical and horizontal', $format1);


###############################################################################
#
# Example 2: Text aligned to the top and left
#
my $format2 = $workbook->add_format(
                                    border  => 6,
                                    bold    => 1,
                                    color   => 'red',
                                    valign  => 'top',
                                    align   => 'left',
                                  );



$worksheet->merge_range('B5:D6', 'Aligned to the top and left', $format2);


###############################################################################
#
# Example 3:  Text aligned to the bottom and right
#
my $format3 = $workbook->add_format(
                                    border  => 6,
                                    bold    => 1,
                                    color   => 'red',
                                    valign  => 'bottom',
                                    align   => 'right',
                                  );



$worksheet->merge_range('B8:D9', 'Aligned to the bottom and right', $format3);


###############################################################################
#
# Example 4:  Text justified (i.e. wrapped) in the cell
#
my $format4 = $workbook->add_format(
                                    border  => 6,
                                    bold    => 1,
                                    color   => 'red',
                                    valign  => 'top',
                                    align   => 'justify',
                                  );



$worksheet->merge_range('B11:D12', 'Justified: '.'so on and ' x18, $format4);


Youez - 2016 - github.com/yon3zu
LinuXploit