Sponsored Content
Full Discussion: split xlsx to csv using perl
Top Forums Programming split xlsx to csv using perl Post 302446203 by rajamadhavan on Wednesday 18th of August 2010 04:10:08 AM
Old 08-18-2010
You may try using Spresdsheet::ParseExcel module...

Spreadsheet::ParseExcel - search.cpan.org
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl search csv fileA where two strings exist on another csv fileB

Hi I have two csv files, with the following formats: FileA.log: Application, This occured blah Application, That occured blah Application, Also this AnotherLog, Bob did this AnotherLog, Dave did that FileB.log: Uk, London, Application, datetime, LaterDateTime, Today it had'nt... (8 Replies)
Discussion started by: PerlNewbRP
8 Replies

2. Shell Programming and Scripting

Convert xlsx worksheet to separate csv

Hi All, I need a solution to convert my .xlsx file which has lot of worksheet, convert to separate csv file. Is there any shell script to do this? I can’t use excel macro to do this, since it was password locked. I need the csv output as an input to my shell script. (1 Reply)
Discussion started by: ranjancom2000
1 Replies

3. Shell Programming and Scripting

perl module to convert xlsx format to xls format

Hi Folks, I have written a perl script that reads data from excel sheet(.xls) using Spreadsheet::ParseExcel module. But the problem is this module doesn't work for excel sheets with extension .xlsx. I have gone through Spreadsheet::XLSX module with which we can read from .xlsx file directly.... (1 Reply)
Discussion started by: giridhar276
1 Replies

4. Shell Programming and Scripting

Perl: module to convert xlsx to csv

Is there any perl module to convert .xlsx file(excel sheet 2007) to a csv file. (1 Reply)
Discussion started by: giridhar276
1 Replies

5. Shell Programming and Scripting

perl : date from excel(.xlsx) not printed properly(format is changed)

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

6. Shell Programming and Scripting

Perl :Is it possible to read the excel 2007 sheet on unix machine using spredsheet::xlsx module

I have an Excel 2007 excel sheet on windows machine and using Spreadsheet::XLSX I had written a script to read the excel sheet and was successful. My requirement is I need to generate another excel sheet from the old excel 2007 sheet on unix machine. Now is it possible to read the excel... (2 Replies)
Discussion started by: giridhar276
2 Replies

7. UNIX for Dummies Questions & Answers

[Solved] Perl Question - split function with csv file

Hi all, I have a csv file that appears as follows: ,2013/03/26,2012/12/26,4,1,"2017/09/26,5.75%","2017/09/26,1,2018/09/26,1,2019/09/26,1,2020/09/26,1,2021/09/26,1",,,2012/12/26,now when i use the split function like this: my @f = split/,/; the split function will split the data that is... (2 Replies)
Discussion started by: WongSifu
2 Replies

8. Shell Programming and Scripting

Perl script to Convert XLSX or XLS files to CSV file

Hi All, I've got in a situation where I need to convert .xlsx or .xls formatted files into simple text file or .csv file. I've found many options but doing this using PERL script is the best way I believe.I'm in AIX box. Perl code should have 2 params while running. i.e perl... (1 Reply)
Discussion started by: manab86
1 Replies

9. Shell Programming and Scripting

Perl script to convert xlsx to xls file

Hi I am trying one perl script to convert xlsx to xls file but could not able to get all the rows and columns in the xls file . This scriptFILE is basically to convert XLSX to CSV .. I am tweaking the script to convert XLSX to XLS file also #######################FILE... (3 Replies)
Discussion started by: kshitij
3 Replies

10. Shell Programming and Scripting

Multiple CSV to XLSX with multiple tab

I am using KSH, share some sample code to merge multiple CSV files (each CSV has different number of columns) in same Directory into single XLSX with multiple tab/sheet - each CSV goes to each sheet/tab in the same XLSX.. (0 Replies)
Discussion started by: gksenthilkumar
0 Replies
Spreadsheet::ParseExcel::Worksheet(3pm) 		User Contributed Perl Documentation		   Spreadsheet::ParseExcel::Worksheet(3pm)

NAME
Spreadsheet::ParseExcel::Worksheet - A class for Worksheets. 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 "Spreadsheet::ParseExcel::Worksheet" class encapsulates the properties of an Excel worksheet. It has the following methods: $worksheet->get_cell() $worksheet->row_range() $worksheet->col_range() $worksheet->get_name() $worksheet->get_h_pagebreaks() $worksheet->get_v_pagebreaks() $worksheet->get_merged_areas() $worksheet->get_row_heights() $worksheet->get_col_widths() $worksheet->get_default_row_height() $worksheet->get_default_col_width() $worksheet->get_header() $worksheet->get_footer() $worksheet->get_margin_left() $worksheet->get_margin_right() $worksheet->get_margin_top() $worksheet->get_margin_bottom() $worksheet->get_margin_header() $worksheet->get_margin_footer() $worksheet->get_paper() $worksheet->get_start_page() $worksheet->get_print_order() $worksheet->get_print_scale() $worksheet->get_fit_to_pages() $worksheet->is_portrait() $worksheet->is_centered_horizontally() $worksheet->is_centered_vertically() $worksheet->is_print_gridlines() $worksheet->is_print_row_col_headers() $worksheet->is_print_black_and_white() $worksheet->is_print_draft() $worksheet->is_print_comments() get_cell($row, $col) Return the "Cell" object at row $row and column $col if it is defined. Otherwise returns undef. my $cell = $worksheet->get_cell($row, $col); row_range() Returns a two-element list "($min, $max)" containing the minimum and maximum defined rows in the worksheet. If there is no row defined $max is smaller than $min. my ( $row_min, $row_max ) = $worksheet->row_range(); col_range() Returns a two-element list "($min, $max)" containing the minimum and maximum of defined columns in the worksheet. If there is no column defined $max is smaller than $min. my ( $col_min, $col_max ) = $worksheet->col_range(); get_name() The "get_name()" method returns the name of the worksheet. my $name = $worksheet->get_name(); get_h_pagebreaks() The "get_h_pagebreaks()" method returns an array ref of row numbers where a horizontal page break occurs. my $h_pagebreaks = $worksheet->get_h_pagebreaks(); Returns "undef" if there are no pagebreaks. get_v_pagebreaks() The "get_v_pagebreaks()" method returns an array ref of column numbers where a vertical page break occurs. my $v_pagebreaks = $worksheet->get_v_pagebreaks(); Returns "undef" if there are no pagebreaks. get_merged_areas() The "get_merged_areas()" method returns an array ref of cells that are merged. my $merged_areas = $worksheet->get_merged_areas(); Each merged area is represented as follows: [ $start_row, $start_col, $end_row, $end_col] Returns "undef" if there are no merged areas. get_row_heights() The "get_row_heights()" method returns an array_ref of row heights. my $row_heights = $worksheet->get_row_heights(); Returns "undef" if the property isn't set. get_col_widths() The "get_col_widths()" method returns an array_ref of column widths. my $col_widths = $worksheet->get_col_widths(); Returns "undef" if the property isn't set. get_default_row_height() The "get_default_row_height()" method returns the default row height for the worksheet. Generally 12.75. my $default_row_height = $worksheet->get_default_row_height(); get_default_col_width() The "get_default_col_width()" method returns the default column width for the worksheet. Generally 8.43. my $default_col_width = $worksheet->get_default_col_width(); get_header() The "get_header()" method returns the worksheet header string. This string can contain control codes for alignment and font properties. Refer to the Excel on-line help on headers and footers or to the Spreadsheet::WriteExcel documentation for set_header(). my $header = $worksheet->get_header(); Returns "undef" if the property isn't set. get_footer() The "get_footer()" method returns the worksheet footer string. This string can contain control codes for alignment and font properties. Refer to the Excel on-line help on headers and footers or to the Spreadsheet::WriteExcel documentation for set_header(). my $footer = $worksheet->get_footer(); Returns "undef" if the property isn't set. get_margin_left() The "get_margin_left()" method returns the left margin of the worksheet in inches. my $margin_left = $worksheet->get_margin_left(); Returns "undef" if the property isn't set. get_margin_right() The "get_margin_right()" method returns the right margin of the worksheet in inches. my $margin_right = $worksheet->get_margin_right(); Returns "undef" if the property isn't set. get_margin_top() The "get_margin_top()" method returns the top margin of the worksheet in inches. my $margin_top = $worksheet->get_margin_top(); Returns "undef" if the property isn't set. get_margin_bottom() The "get_margin_bottom()" method returns the bottom margin of the worksheet in inches. my $margin_bottom = $worksheet->get_margin_bottom(); Returns "undef" if the property isn't set. get_margin_header() The "get_margin_header()" method returns the header margin of the worksheet in inches. my $margin_header = $worksheet->get_margin_header(); Returns a default value of 0.5 if not set. get_margin_footer() The "get_margin_footer()" method returns the footer margin of the worksheet in inches. my $margin_footer = $worksheet->get_margin_footer(); Returns a default value of 0.5 if not set. get_paper() The "get_paper()" method returns the printer paper size. my $paper = $worksheet->get_paper(); The value corresponds to the formats shown below: Index Paper format Paper size ===== ============ ========== 0 Printer default - 1 Letter 8 1/2 x 11 in 2 Letter Small 8 1/2 x 11 in 3 Tabloid 11 x 17 in 4 Ledger 17 x 11 in 5 Legal 8 1/2 x 14 in 6 Statement 5 1/2 x 8 1/2 in 7 Executive 7 1/4 x 10 1/2 in 8 A3 297 x 420 mm 9 A4 210 x 297 mm 10 A4 Small 210 x 297 mm 11 A5 148 x 210 mm 12 B4 250 x 354 mm 13 B5 182 x 257 mm 14 Folio 8 1/2 x 13 in 15 Quarto 215 x 275 mm 16 - 10x14 in 17 - 11x17 in 18 Note 8 1/2 x 11 in 19 Envelope 9 3 7/8 x 8 7/8 20 Envelope 10 4 1/8 x 9 1/2 21 Envelope 11 4 1/2 x 10 3/8 22 Envelope 12 4 3/4 x 11 23 Envelope 14 5 x 11 1/2 24 C size sheet - 25 D size sheet - 26 E size sheet - 27 Envelope DL 110 x 220 mm 28 Envelope C3 324 x 458 mm 29 Envelope C4 229 x 324 mm 30 Envelope C5 162 x 229 mm 31 Envelope C6 114 x 162 mm 32 Envelope C65 114 x 229 mm 33 Envelope B4 250 x 353 mm 34 Envelope B5 176 x 250 mm 35 Envelope B6 176 x 125 mm 36 Envelope 110 x 230 mm 37 Monarch 3.875 x 7.5 in 38 Envelope 3 5/8 x 6 1/2 in 39 Fanfold 14 7/8 x 11 in 40 German Std Fanfold 8 1/2 x 12 in 41 German Legal Fanfold 8 1/2 x 13 in 256 User defined The two most common paper sizes are "1 = "US Letter"" and "9 = A4". Returns 9 by default. get_start_page() The "get_start_page()" method returns the page number that printing will start from. my $start_page = $worksheet->get_start_page(); Returns 0 if the property isn't set. get_print_order() The "get_print_order()" method returns 0 if the worksheet print "page order" is "Down then over" (the default) or 1 if it is "Over then down". my $print_order = $worksheet->get_print_order(); get_print_scale() The "get_print_scale()" method returns the workbook scale for printing. The print scale fctor can be in the range 10 .. 400. my $print_scale = $worksheet->get_print_scale(); Returns 100 by default. get_fit_to_pages() The "get_fit_to_pages()" method returns the number of pages wide and high that the printed worksheet page will fit to. my ($pages_wide, $pages_high) = $worksheet->get_fit_to_pages(); Returns (0, 0) if the property isn't set. is_portrait() The "is_portrait()" method returns true if the worksheet has been set for printing in portrait mode. my $is_portrait = $worksheet->is_portrait(); Returns 0 if the worksheet has been set for printing in horizontal mode. is_centered_horizontally() The "is_centered_horizontally()" method returns true if the worksheet has been centered horizontally for printing. my $is_centered_horizontally = $worksheet->is_centered_horizontally(); Returns 0 if the property isn't set. is_centered_vertically() The "is_centered_vertically()" method returns true if the worksheet has been centered vertically for printing. my $is_centered_vertically = $worksheet->is_centered_vertically(); Returns 0 if the property isn't set. is_print_gridlines() The "is_print_gridlines()" method returns true if the worksheet print "gridlines" option is turned on. my $is_print_gridlines = $worksheet->is_print_gridlines(); Returns 0 if the property isn't set. is_print_row_col_headers() The "is_print_row_col_headers()" method returns true if the worksheet print "row and column headings" option is turned on. my $is_print_row_col_headers = $worksheet->is_print_row_col_headers(); Returns 0 if the property isn't set. is_print_black_and_white() The "is_print_black_and_white()" method returns true if the worksheet print "black and white" option is turned on. my $is_print_black_and_white = $worksheet->is_print_black_and_white(); Returns 0 if the property isn't set. is_print_draft() The "is_print_draft()" method returns true if the worksheet print "draft" option is turned on. my $is_print_draft = $worksheet->is_print_draft(); Returns 0 if the property isn't set. is_print_comments() The "is_print_comments()" method returns true if the worksheet print "comments" option is turned on. my $is_print_comments = $worksheet->is_print_comments(); Returns 0 if the property isn't set. 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::Worksheet(3pm)
All times are GMT -4. The time now is 03:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy