!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux web25.us.cloudlogin.co 5.10.237-xeon-hst #1 SMP Mon May 5 15:10:04 UTC 2025 x86_64 

uid=233359(alpastrology) gid=888(tty) groups=888(tty),33(tape) 

Safe-mode: OFF (not secure)

/usr/share/doc/perl-Spreadsheet-WriteExcel/examples/   drwxr-xr-x
Free 6181.83 GB of 6263.03 GB (98.7%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     filehandle.pl (2.77 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl -w

###############################################################################
#
# Example of using Spreadsheet::WriteExcel to write Excel files to
# different filehandles.
#
# reverse('©'), April 2003, John McNamara, jmcnamara@cpan.org
#

use strict;
use Spreadsheet::WriteExcel;
use IO::Scalar;




###############################################################################
#
# Example 1. This demonstrates the standard way of creating an Excel file by
# specifying a file name.
#

my $workbook1  = Spreadsheet::WriteExcel->new('fh_01.xls');
my $worksheet1 = $workbook1->add_worksheet();

$worksheet1->write(0, 0,  "Hi Excel!");




###############################################################################
#
# Example 2. Write an Excel file to an existing filehandle.
#

open    TEST, "> fh_02.xls" or die "Couldn't open file: $!";
binmode TEST; # Always do this regardless of whether the platform requires it.

my $workbook2  = Spreadsheet::WriteExcel->new(\*TEST);
my $worksheet2 = $workbook2->add_worksheet();

$worksheet2->write(0, 0,  "Hi Excel!");




###############################################################################
#
# Example 3. Write an Excel file to an existing OO style filehandle.
#

my $fh = FileHandle->new("> fh_03.xls")
         or die "Couldn't open file: $!";

binmode($fh);

my $workbook3  = Spreadsheet::WriteExcel->new($fh);
my $worksheet3 = $workbook3->add_worksheet();

$worksheet3->write(0, 0,  "Hi Excel!");




###############################################################################
#
# Example 4. Write an Excel file to a string via IO::Scalar. Please refer to
# the IO::Scalar documentation for further details.
#

my $xls_str;

tie *XLS, 'IO::Scalar', \$xls_str;

my $workbook4  = Spreadsheet::WriteExcel->new(\*XLS);
my $worksheet4 = $workbook4->add_worksheet();

$worksheet4->write(0, 0, "Hi Excel 4");
$workbook4->close(); # This is required before we use the scalar


# The Excel file is now in $xls_str. As a demonstration, print it to a file.
open    TMP, "> fh_04.xls" or die "Couldn't open file: $!";
binmode TMP;
print   TMP  $xls_str;
close   TMP;




###############################################################################
#
# Example 5. Write an Excel file to a string via IO::Scalar's newer interface.
# Please refer to the IO::Scalar documentation for further details.
#
my $xls_str2;

my $fh5 = IO::Scalar->new(\$xls_str2);


my $workbook5  = Spreadsheet::WriteExcel->new($fh5);
my $worksheet5 = $workbook5->add_worksheet();

$worksheet5->write(0, 0, "Hi Excel 5");
$workbook5->close(); # This is required before we use the scalar

# The Excel file is now in $xls_str. As a demonstration, print it to a file.
open    TMP, "> fh_05.xls" or die "Couldn't open file: $!";
binmode TMP;
print   TMP  $xls_str2;
close   TMP;



:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0141 ]--