10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hey Guys ,
Recently working on a requirement , i had to deal with XLS file with multiple tabs and the requirement was as below :
1. Convert one XLS file with multiple tabs to multiple CSV files.
-- As i was working on MAC , so it was quite easy through APPLESCRIPT to deal with this.But... (2 Replies)
Discussion started by: himanshu sood
2 Replies
2. Shell Programming and Scripting
HI All,
I have a .xls file , in which I have multiple worksheets , I need to remove all the worksheets except the worksheet by name CDR_LOAD_STATS, how can I do this in unix.
Please guide me.
Regards,
Deepti (7 Replies)
Discussion started by: gaur.deepti
7 Replies
3. Shell Programming and Scripting
Hi,
My requirement is to convert the xls to csv file with utf-8 conversion.
Is there any way please suggest me.
Thanks,
Raja (4 Replies)
Discussion started by: cnraja
4 Replies
4. UNIX for Advanced & Expert Users
Hi All,
I wrote a script to extract data from Oracle DB and place it in a text file , and I have coverted .txt file into comma seperated .csv file and I sent it to my mail box .
I can get .xls file in my inbox.I am getting all data in same column and in different rows , without column... (1 Reply)
Discussion started by: krthkmuthu
1 Replies
5. AIX
Hi All,
I have a java program running in AIX machine which gives me the output in form of .CSV but my clients wants output in the form of .xls
When I gave the command mv <filename.csv> <filename.xls>
The contents of this .xls file is not exactly in seprate columns as in CSV, the contents... (1 Reply)
Discussion started by: chetu777
1 Replies
6. Shell Programming and Scripting
Hi Folks,
I've to convert manually couple of *.xls files to *.csv files everyday :(
so i was just wondering if anyone could just help me with a shell script or awk script to automate the process :)
PS : Problem is that i cannot use any third party software for the conversion.
Thanking... (1 Reply)
Discussion started by: chaturvedi
1 Replies
7. Shell Programming and Scripting
I need to convert an excel file into a text file
and an excel file into a CSV file..
any code to do that is appreciated
thanks (6 Replies)
Discussion started by: bandar007
6 Replies
8. Shell Programming and Scripting
Hi,
I have a file coming in xxx.txt(csv format) i do some work on it and i need to send out as a .xls format. Is there any way there is some code i can use in my script to convert this?
I'm struggling on this.
Thanks (11 Replies)
Discussion started by: Pablo_beezo
11 Replies
9. UNIX for Advanced & Expert Users
Hello,
I've been tasked with sending 3 types of data (file size, row count, and file name) to a csv file every month for various vendors. I have been asked to put this in one csv or xls file with each vendor being a different tab (or worksheet). Until now, we have been finding and emailing... (4 Replies)
Discussion started by: tekster757
4 Replies
10. Shell Programming and Scripting
Can we convert an xls file into csv format in Unix
Thanks
Suresh (1 Reply)
Discussion started by: sureshg_sampat
1 Replies
Text::CSV::Encoded::Coder::EncodeGuess(3pm) User Contributed Perl Documentation Text::CSV::Encoded::Coder::EncodeGuess(3pm)
NAME
Text::CSV::Encoded::Coder::EncodeGuess - Text::CSV::Encoded coder class using Encode::Guess
SYNOPSIS
use Text::CSV::Encoded coder_class => 'Text::CSV::Encoded::Coder::EncodeGuess';
use Spreadsheet::ParseExcel;
my $csv = Text::CSV::Encoded->new();
$csv->encoding( ['ucs2', 'ascii'] ); # guessing ucs2 or ascii?
$csv->encoding_to_combine('shiftjis');
my $excel = Spreadsheet::ParseExcel::Workbook->Parse( $file );
my $sheet = $excel->{Worksheet}->[0];
for my $row ( $sheet->{MinRow} .. $sheet->{MaxRow} ) {
my @fields;
for my $col ( $sheet->{MinCol} .. $sheet->{MaxCol} ) {
my $cell = $sheet->{Cells}[$row][$col];
push @fields, $cell->{Val};
}
$csv->combine( @fields ) or die;
print $csv->string, "
";
}
DESCRIPTION
This module is inherited from Text::CSV::Encoded::Coder::Encode.
USE
Except for 2 attributes, same as Text::CSV::Encoded::Coder::Encode.
encoding_in
$csv = $csv->encoding_in( $encoding_list_ref );
The accessor to an encoding for pre-parsing CSV strings. If no encoding is given, returns current $encoding, otherwise the object itself.
$encoding_list_ref = $csv->encoding_in()
When you pass a list reference, it might guess the encoding from the given list.
$csv->encoding_in( ['shiftjis', 'euc-jp', 'iso-20022-jp'] );
If it cannot guess the encoding, the first encoding of the list is used.
encoding
$csv = $csv->encoding( $encoding_list_ref );
$encoding_list_ref = $csv->encoding();
You can pass a list reference to this attribute only:
* For list data consumed by combine().
* For list reference returned by getline().
In other word, in "combine" and "print", it might guess an encoding for the passing list data. If it cannot guess the encoding, the first
encoding of the list is used.
SEE ALSO
Encode, Encode::Guess
AUTHOR
Makamaka Hannyaharamitu, <makamaka[at]cpan.org>
COPYRIGHT AND LICENSE
Copyright 2008-2010 by Makamaka Hannyaharamitu
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2010-04-26 Text::CSV::Encoded::Coder::EncodeGuess(3pm)