Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-30-2013, 09:52 PM   #1
Registered: Jul 2010
Posts: 170

Rep: Reputation: 2
( Excel::Writer::XLSX->new) question: how to open single sheet by name


I went through cpan page of (Excel::Writer::XLSX)
It only say one method which is open document, and all the sheets will be read into
an array, then you loop array to do some thing with sheets.

In my case I only have one sheet, I did datadump on object

my $workbook = Excel::Writer::XLSX->new( 'B.xlsx' ) ;

print Dumper $workbook;
but did not get any thing I could use.
So how do address one sheet with out looping into array.
Old 05-01-2013, 04:06 AM   #2
Registered: Apr 2013
Distribution: Arch and SuSE
Posts: 151

Rep: Reputation: Disabled
Please clarify. Are you trying to use Libreoffice to handle this document?

"It only say one method" to what does 'it' refer?
Old 05-01-2013, 05:39 AM   #3
LQ Guru
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
xlsx is a Microsoft format for a spreadsheet. Are you trying to convert that to an .ods format, which is an opendocument format for a spreadsheet?
Old 05-01-2013, 06:21 AM   #4
Senior Member
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,550

Rep: Reputation: 137Reputation: 137
This perl module cannot be used to write to an existing excel file. It can create new files only.


The Excel::Writer::XLSX module can be used to create an Excel file in the 2007+ XLSX format.

The XLSX format is the Office Open XML (OOXML) format used by Excel 2007 and later.

Multiple worksheets can be added to a workbook and formatting can be applied to cells. Text, numbers, and formulas can be written to the cells.

This module cannot, as yet, be used to write to an existing Excel XLSX file.

use Excel::Writer::XLSX;

# Create a new Excel workbook
my $workbook = Excel::Writer::XLSX->new( 'perl.xlsx' );

# Add a worksheet
$worksheet = $workbook->add_worksheet();
If you use Spreadsheet::ParseExcel you usually loop through te worksheets with
something like
for my $worksheet ( $workbook->worksheets() ) {


my @sheets = $workbook->worksheets();
$sheets[0] will contain the first element.

So what's the problem with that?

Last edited by j-ray; 05-01-2013 at 06:27 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO transfer Hosts in excel sheet to file in LINUX? manalisharmabe Linux - Newbie 2 11-07-2011 02:18 PM
i want c program for fetching data from excel sheet rinu budhbhatti Programming 3 01-31-2011 09:23 AM
Want to import an excel sheet data from from a remote linux server envisage Programming 1 01-31-2008 02:08 PM
how to import MS-Excel sheet data using PHP dileepkk Programming 1 07-28-2004 03:23 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:16 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration