LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-31-2011, 04:06 AM   #1
qrange
Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable, amd64
Posts: 827

Rep: Reputation: 32
converting .xlsx to .xls from bash


I need to convert .xlsx to .xls from command line, can it be done?

thanks.
 
Old 10-31-2011, 05:02 AM   #2
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,345

Rep: Reputation: 227Reputation: 227Reputation: 227
Cool

Quote:
Originally Posted by qrange View Post
I need to convert .xlsx to .xls from command line, can it be done?

thanks.
hi qrange, what are you trying to do? .xlsx is an office 2007 to 2010 file name extension and .xls is office 2003 and other previous versions.

if you rename it the file might be unusable, why not open it on excel or open office and specify the file extension that you want.

conversion is not possible using command line only, you can rename the file using mv command but the file maybe corrupted.
 
Old 10-31-2011, 06:20 AM   #3
qrange
Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable, amd64
Posts: 827

Original Poster
Rep: Reputation: 32
nah, I need to parse it with perl.
I've found out there is a Spreadsheet::XLSX for that, so will try without pre-converting.
 
Old 01-22-2014, 01:45 AM   #4
umamahesh142
LQ Newbie
 
Registered: Jan 2014
Posts: 2

Rep: Reputation: Disabled
I am trying to edit the xlsx files using perl in linux.

Is the Spreadsheet::XLSX works with linux in PERL ? If you have already used please suggest me the syntaxes and let me know if any packages has to be installed to use this.

I have used like below and ended up with errors.

Code:
/************************************/
#!/usr/bin/perl

use strict;
#use Text::Iconv;
# my $converter = Text::Iconv -> new ("utf-8", "windows-1251");

# Text::Iconv is not really required.
# This can be any object with the convert method. Or nothing.

use Spreadsheet::XLSX;

/************************************/
Error:
Can't locate Spreadsheet/XLSX.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at sample.pl line 10.


Thanks for your help.
 
Old 01-23-2014, 07:29 AM   #5
qrange
Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable, amd64
Posts: 827

Original Poster
Rep: Reputation: 32
i think error "Can't locate Spreadsheet/XLSX.pm"

means you haven't installed it properly. start CPAN and use 'install Spreadsheet::XLSX'
or use your package manager.
 
1 members found this post helpful.
Old 01-23-2014, 09:00 AM   #6
umamahesh142
LQ Newbie
 
Registered: Jan 2014
Posts: 2

Rep: Reputation: Disabled
Thank You. I will ask my admin to install the Spreadsheet::XLSX module. Mean-time I will work with xlsparser.
 
  


Reply


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
looking for software to open .xlsx files with linux tjcarol Linux - Software 3 09-28-2011 06:37 AM
converting a py script to bash saawan Linux - Software 2 05-06-2009 12:56 PM
xlsx to xls proNick Linux - Software 12 12-15-2008 01:53 AM
converting bash to perl sporty Programming 2 07-14-2006 05:26 PM
.docx, .xlsx, .pptx, XML Office formats? microsoft/linux General 1 08-02-2005 02:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:34 AM.

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