!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.3.27 

uname -a: Linux pdx1-shared-a4-04 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64 

uid=6659440(dh_z2jmpm) gid=2086089(pg10499364) groups=2086089(pg10499364)  

Safe-mode: OFF (not secure)

/usr/share/doc/libspreadsheet-writeexcel-perl/examples/   drwxr-xr-x
Free 718.73 GB of 879.6 GB (81.71%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     write_handler2.pl (1.91 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |

###############################################################################
#
# Example of how to add a user defined data handler to the Spreadsheet::
# WriteExcel write() method.
#
# The following example shows how to add a handler for a 7 digit ID number.
# It adds an additional constraint to the write_handler1.pl in that it only
# filters data that isn't in the third column.
#
#
# reverse('�'), September 2004, John McNamara, [email protected]
#

use strict;
use Spreadsheet::WriteExcel;


my $workbook    = Spreadsheet::WriteExcel->new("write_handler2.xls");
my $worksheet   = $workbook->add_worksheet();


###############################################################################
#
# Add a handler for 7 digit id numbers. This is useful when you want a string
# such as 0000001 written as a string instead of a number and thus preserve
# the leading zeroes.
#
# Note: you can get the same effect using the keep_leading_zeros() method but
# this serves as a simple example.
#
$worksheet->add_write_handler(qr[^\d{7}$], \&write_my_id);


###############################################################################
#
# The following function processes the data when a match is found. The handler
# is set up so that it only filters data if it is in the third column.
#
sub write_my_id {

    my $worksheet = shift;
    my $col       = $_[1];

    # col is zero based
    if ($col != 2) {
        return $worksheet->write_string(@_);
    }
    else {
        # Reject the match and return control to write()
        return undef;
    }

}


# This format maintains the cell as text even if it is edited.
my $id_format   = $workbook->add_format(num_format => '@');


# Write some numbers in the user defined format
$worksheet->write('A1', '0000000', $id_format);
$worksheet->write('B1', '0000001', $id_format);
$worksheet->write('C1', '0000002', $id_format);
$worksheet->write('D1', '0000003', $id_format);



__END__


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0148 ]--