10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have a file with the below contents :
Policy Name: Backup_bkp
Policy Type: Catalog_bkp
Active: yes
Effective date: 08/07/2013 02:02:12
Mult. Data Streams: no
Client Encrypt: no
Checkpoint: no
Policy Priority: ... (11 Replies)
Discussion started by: rahul2662
11 Replies
2. Shell Programming and Scripting
Hi all.
I am working on the below requirement of generating .xml file from .xls file which i have , can someone please help me or in writing the perl script for the same:
The xls file format is as below which has two columns and number of rows are not fixed:
Fixlet Name ... (12 Replies)
Discussion started by: omkar.jadhav
12 Replies
3. Shell Programming and Scripting
Hi ,
i am generating some data by firing sql query with connecting to the database by my solaris box.
The below one should be the header line of my excel ,here its coming in separate row.
TO_CHAR(C. CURR_EMP_NO
---------- ---------------
LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies
4. Shell Programming and Scripting
Hello friends
I want to convert an csv file on unix (which is generated by a ETL application) to a formatted excel sheet like .I have roughly like 28 columns
1)All numbers need to be stored as numbers with leading zeros-like format as text for this column to preserve leading zeroes e.g... (6 Replies)
Discussion started by: etldev
6 Replies
5. Shell Programming and Scripting
All,
I have an excel sheet Excel1.xls that has some entries.
I have one more excel sheet Excel2.xls that has entries only in those cells which are blank in Excel1.xls
These may be in different workbooks. They are totally independent made by 2 different users.
I have placed them in a... (1 Reply)
Discussion started by: Anamika08
1 Replies
6. Shell Programming and Scripting
I am trying to convert xlsx sheet to a csv file.
In .xlsx file there a cell with date
Mon 08/27/12
while reading this cell using Spreadsheet::XLSX, the output is display with numeric value i.e., 41148.
from Spreadsheet::XLSX module :
use Text::Iconv;
my $converter =... (1 Reply)
Discussion started by: giridhar276
1 Replies
7. Shell Programming and Scripting
Hi ,
I am writing a simple excel file and want to create the file under say 'D:\Documents and Settings'. The problem with my code is it is writing in the same directory instead of the specified. Here is a sample code
use Spreadsheet::WriteExcel;
my $workbook =... (1 Reply)
Discussion started by: daptal
1 Replies
8. Shell Programming and Scripting
Hi,
I would like to modify an existing excel cell format to a custom format.
Is there a way to do it with out writing into a new excel file.
In-place editing?
Thanks (0 Replies)
Discussion started by: sandeep78
0 Replies
9. Shell Programming and Scripting
Hi,
I am trying to find a way to read an excel work book with multiple worksheets.
And write each worksheet into a new excel file using perl. My environment is Unix.
For example: I have an excel workbook TEST.xls and it has Sheet1, Sheet2, Sheet3 worksheets. I would like to create... (2 Replies)
Discussion started by: sandeep78
2 Replies
10. Filesystems, Disks and Memory
Hi,
I have a problem in formatting the excel file from my script.
Assume that there is a text file generated using a 'C shell Unix script' with a format similar to the one seen below. Each column has a fixed length and every row is going to have a value against a column depending on the... (1 Reply)
Discussion started by: subra
1 Replies
Spreadsheet::XLSX::Utility2007(3pm) User Contributed Perl Documentation Spreadsheet::XLSX::Utility2007(3pm)
NAME
Spreadsheet::XLSX::Utility2007 - Utility function for Spreadsheet::XLSX
SYNOPSIS
use strict;
#Declare
use Spreadsheet::XLSX::Utility qw(ExcelFmt ExcelLocaltime LocaltimeExcel);
#Convert localtime ->Excel Time
my $iBirth = LocaltimeExcel(11, 10, 12, 23, 2, 64);
# = 1964-3-23 12:10:11
print $iBirth, "
"; # 23459.5070717593
#Convert Excel Time -> localtime
my @aBirth = ExcelLocaltime($iBirth, undef);
print join(":", @aBirth), "
"; # 11:10:12:23:2:64:1:0
#Formatting
print ExcelFmt('yyyy-mm-dd', $iBirth), "
"; #1964-3-23
print ExcelFmt('m-d-yy', $iBirth), "
"; # 3-23-64
print ExcelFmt('#,##0', $iBirth), "
"; # 23,460
print ExcelFmt('#,##0.00', $iBirth), "
"; # 23,459.51
print ExcelFmt('"My Birthday is (m/d):" m/d', $iBirth), "
";
# My Birthday is (m/d): 3/23
DESCRIPTION
Spreadsheet::XLSX::Utility exports utility functions concerned with Excel format setting.
ExcelFmt is used by Spreadsheet::XLSX::Fmt2007.pm which is used by Spreadsheet::XLSX.
Functions
This module can export 3 functions: ExcelFmt, ExcelLocaltime and LocaltimeExcel.
ExcelFmt
$sTxt = ExcelFmt($sFmt, $iData [, $i1904]);
$sFmt is a format string for Excel. $iData is the target value. If $flg1904 is true, this functions assumes that epoch is 1904. $sTxt is
the result.
For more detail and examples, please refer sample/chkFmt.pl in this distribution.
ex.
ExcelLocaltime
($iSec, $iMin, $iHour, $iDay, $iMon, $iYear, $iwDay, $iMSec) =
ExcelLocaltime($iExTime [, $flg1904]);
ExcelLocaltime converts time information in Excel format into Perl localtime format. $iExTime is a time of Excel. If $flg1904 is true,
this functions assumes that epoch is 1904. $iSec, $iMin, $iHour, $iDay, $iMon, $iYear, $iwDay are same as localtime. $iMSec means
1/1,000,000 seconds(ms).
LocaltimeExcel
$iExTime = LocaltimeExcel($iSec, $iMin, $iHour, $iDay, $iMon, $iYear [,$iMSec] [,$flg1904])
LocaltimeExcel converts time information in Perl localtime format into Excel format . $iSec, $iMin, $iHour, $iDay, $iMon, $iYear are same
as localtime.
If $flg1904 is true, this functions assumes that epoch is 1904. $iExTime is a time of Excel.
col2int
$iInt = col2int($sCol);
converts a excel row letter into an int for use in an array
This function was contributed by Kevin Mulholland.
int2col
$sCol = int2col($iRow);
convert a column number into column letters NOET: This is quite a brute force coarse method does not manage values over 701 (ZZ)
This function was contributed by Kevin Mulholland.
sheetRef
($iRow, $iCol) = sheetRef($sStr);
convert an excel letter-number address into a useful array address NOTE: That also Excel uses X-Y notation, we normally use Y-X in arrays
$sStr, excel coord (eg. A2).
This function was contributed by Kevin Mulholland.
xls2csv
$sCsvTxt = xls2csv($sFileName, $sRegion, $iRotate);
convert a chunk of an excel file into csv text chunk $sRegions = "sheet-colrow:colrow" (ex. '1-A1:B2' means 'A1:B2' for sheet 1) $iRotate
= 0 or 1 (output should be rotated or not)
This function was contributed by Kevin Mulholland.
AUTHOR
Rob Polocz rob.polocz@trackvia.com based on work by for Spreadsheet::ParseExcel by Kawai Takanori (Hippo2000) used with permission
SEE ALSO
Spreadsheet::ParseExcel, Spreadsheet::WriteExcel
COPYRIGHT
This module is part of the Spreadsheet::XLSX distribution.
perl v5.10.1 2010-05-16 Spreadsheet::XLSX::Utility2007(3pm)