if ( -d $dest ) { was not needed, the previous chdir would have failed if $dest was not a directory.
chomp $file is not needed, a trailing newline is an acceptable (if not appreciated) character in a directory entry
Be reluctant to use system calls in a perlscript. In this case, my $sheetname = `basename $file | cut -d. -f1`; was replaced by $file =~ s{\..*$}{}; as $file is already a "basename" and you were just trimming off everything after the first ".".
Hi,
I have a question about using C to write excel file.
There is a way to write into a sheet into a file excel, like this:
FILE * File;
pMyFile = fopen("test.xls", "w+");
fprintf(File, "\n\n"); /* go to the row 2 of the column A*/
fprintf(File, "%s", "Hi pippo!"); /* write... (7 Replies)
Hi,
There is this requirement to create multiple work sheets in an MS Excel file through UNIX.
We normally can create one work sheet in unix by either tab or comma delimiting and appending .xls or .csv to the file name, but can we create multiple work sheets.
Regards,
Puspendu (1 Reply)
Hi,
I have generated an excel sheet using a shell script. i have converted the output text file to an excel and got the desired output. However, in a particular column in the excel the values of the numbers start with 0.
e.g. 078393343, 00342442, etc.
But, in the resulting excel I get as... (2 Replies)
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)
Hi,
I need your help in sedning sql queries output to different excel sheets.
My requirement is like this:
Query1: Select name from table1 where status = 'Complete'
Query2: Select name from table1 where status = 'Failed'
Query3: Select name from table1 where status = 'Ignored'
... (4 Replies)
Hi
I need to modify an excel file in perl and for which I installed perl in
Linux
1. Open a existing excel file
2. delete an unwanted Sheet called "summary"
3. and i want to insert some data into range of cells ( B1:B11)
4. Remove unwanted value called "Sum" repeated in the... (1 Reply)
Hi UNIX Gods!
Is it possible to merge two cells in .csv file using unix commands?
Imagine that this is my present csv file opened via excel:
Gate Reports| |
fatal alerts | 200 |
is is possible to make it look like this using unix?
Gate Reports |
fatal... (1 Reply)
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)
I have requirement to write two CSV files to one single excel with multiple sheets.
Data present in the two files should sit in excel as different sheets.
How can we achieve this using shell script?
1.csv 2. csv
1,2,3,4 5,6,7,8
XXXXX YYYYY
Res.excel
1.csv data... (1 Reply)
Dear all,
I have a large dictionary database which has the following structure
source word=target word
e.g.
book=livre
Since the database is very large in spite of all the care taken, it so happens that at times the source word is repeated
e.g.
book=livre
book=tome
Since I want to... (7 Replies)
Discussion started by: gimley
7 Replies
LEARN ABOUT DEBIAN
spreadsheet::parseexcel::workbook
Spreadsheet::ParseExcel::Workbook(3pm) User Contributed Perl Documentation Spreadsheet::ParseExcel::Workbook(3pm)NAME
Spreadsheet::ParseExcel::Workbook - A class for Workbooks.
SYNOPSIS
See the documentation for Spreadsheet::ParseExcel.
DESCRIPTION
This module is used in conjunction with Spreadsheet::ParseExcel. See the documentation for Spreadsheet::ParseExcel.
Methods
The following Workbook methods are available:
$workbook->worksheets()
$workbook->worksheet()
$workbook->worksheet_count()
$workbook->get_filename()
$workbook->get_print_areas()
$workbook->get_print_titles()
$workbook->using_1904_date()
worksheets()
The "worksheets()" method returns an array of Worksheet objects. This was most commonly used to iterate over the worksheets in a workbook:
for my $worksheet ( $workbook->worksheets() ) {
...
}
worksheet()
The "worksheet()" method returns a single "Worksheet" object using either its name or index:
$worksheet = $workbook->worksheet('Sheet1');
$worksheet = $workbook->worksheet(0);
Returns "undef" if the sheet name or index doesn't exist.
worksheet_count()
The "worksheet_count()" method returns the number of Woksheet objects in the Workbook.
my $worksheet_count = $workbook->worksheet_count();
get_filename()
The "get_filename()" method returns the name of the Excel file of "undef" if the data was read from a filehandle rather than a file.
my $filename = $workbook->get_filename();
get_print_areas()
The "get_print_areas()" method returns an array ref of print areas.
my $print_areas = $workbook->get_print_areas();
Each print area is as follows:
[ $start_row, $start_col, $end_row, $end_col ]
Returns undef if there are no print areas.
get_print_titles()
The "get_print_titles()" method returns an array ref of print title hash refs.
my $print_titles = $workbook->get_print_titles();
Each print title array ref is as follows:
{
Row => [ $start_row, $end_row ],
Column => [ $start_col, $end_col ],
}
Returns undef if there are no print titles.
using_1904_date()
The "using_1904_date()" method returns true if the Excel file is using the 1904 date epoch instead of the 1900 epoch.
my $using_1904_date = $workbook->using_1904_date();
The Windows version of Excel generally uses the 1900 epoch while the Mac version of Excel generally uses the 1904 epoch.
Returns 0 if the 1900 epoch is in use.
AUTHOR
Maintainer 0.40+: John McNamara jmcnamara@cpan.org
Maintainer 0.27-0.33: Gabor Szabo szabgab@cpan.org
Original author: Kawai Takanori kwitknr@cpan.org
COPYRIGHT
Copyright (c) 2009-2010 John McNamara
Copyright (c) 2006-2008 Gabor Szabo
Copyright (c) 2000-2006 Kawai Takanori
All rights reserved.
You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.
perl v5.10.1 2010-09-17 Spreadsheet::ParseExcel::Workbook(3pm)