Sponsored Content
Top Forums Shell Programming and Scripting Error while Converting Excel to CSV using xls2csv Post 302875513 by Corona688 on Tuesday 19th of November 2013 04:46:46 PM
Old 11-19-2013
Excel is likely to save it as whatever it was in the first place, which is why you keep getting xml. Move your originals to xls and it'll try to keep saving them as xls.

Excel confuses this by calling everything xls. anything from xml, csv, to an actual xls file can be saved under the xls extension sometimes.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Converting excel to text

Is it possible to convert an excel file into a text file using standard HP UNIX commands? Possibly in K Shell? (5 Replies)
Discussion started by: stevefox
5 Replies

2. UNIX for Advanced & Expert Users

Problem in converting password protected excel file to csv file in unix

I need to convert a password protected excel file which will be in UNIX server to a comma separated file. For this I need to open the excel file in UNIX box but the UNIX box doesn't prompt for password instead it is opened in an encrypted manner. I could manually ftp the excel file to local... (2 Replies)
Discussion started by: Devivish
2 Replies

3. UNIX for Dummies Questions & Answers

Excel File to CSV

Hi All, I have to convert the excel file which will be placed in the Unix box to a CSV file using a shell script. Please Advise. Thanks & Regards, Kumar66 (1 Reply)
Discussion started by: kumar66
1 Replies

4. Shell Programming and Scripting

KSH - Text from input file truncated while converting it to excel

Dear Members, I am using the attached script to convert a input file delimited by '|' to excel. However, while processing the attribute change_reason, the whole content of the text under change_reason is not displayed completely in the cell in excel. It is truncated after only first few words.... (1 Reply)
Discussion started by: Yoodit
1 Replies

5. Shell Programming and Scripting

Converting excel to '|' delimiter

Hi All, Can you please suggest me how to convert excel format to ‘|' delimiter file. I need to use perl script Thanks Rama (5 Replies)
Discussion started by: murari83.ds
5 Replies

6. Shell Programming and Scripting

Converting specific Excel file tabs to CSV in Python

Hi list, This is probably something really simple, but I am not particularly familiar with Python so I thought I would ask as I know that python has an excel module. I have an excel document with multiple tabs of data and graphs. One of the tabs is just data which I require to have dumped to... (8 Replies)
Discussion started by: landossa
8 Replies

7. Programming

converting data from excel sheet to oracle using toad

guys i have data in excel sheet , how do i convert that data to database table (2 Replies)
Discussion started by: Gl@)!aTor
2 Replies

8. Shell Programming and Scripting

Shell Script for converting file to Excel or CSV

Hi I have a dat file which has "n" number of columns. The file is delimited. The number of columns keep varying as the file is generated out of DB queries. Could you please help me in writing a script which will generate a XLS or CSV file out of the dat file. (5 Replies)
Discussion started by: Vee
5 Replies

9. UNIX for Dummies Questions & Answers

Convert csv to excel

Hi All, I have a csv file in unix and I need to convert it into excel formate. Please help me out (1 Reply)
Discussion started by: Abhisrajput
1 Replies

10. Shell Programming and Scripting

Converting XML to CSV

Hello, For i while i have been using XMLStarlet to convert several XML files to CSV files. So far this always went fine. Today however i got a new XML format however but i cannot find out how to get the data i need. Below is part of the code where it shows the different format. What... (10 Replies)
Discussion started by: SDohmen
10 Replies
Excel(3pm)						User Contributed Perl Documentation						Excel(3pm)

NAME
DBD::Excel - A class for DBI drivers that act on Excel File. This is still alpha version. SYNOPSIS
use DBI; $hDb = DBI->connect("DBI:Excel:file=test.xls") or die "Cannot connect: " . $DBI::errstr; $hSt = $hDb->prepare("CREATE TABLE a (id INTEGER, name CHAR(10))") or die "Cannot prepare: " . $hDb->errstr(); $hSt->execute() or die "Cannot execute: " . $hSt->errstr(); $hSt->finish(); $hDb->disconnect(); DESCRIPTION
This is still alpha version. The DBD::Excel module is a DBI driver. The module is based on these modules: * Spreadsheet::ParseExcel reads Excel files. * Spreadsheet::WriteExcel writes Excel files. * SQL::Statement a simple SQL engine. * DBI Of course. :-) This module assumes TABLE = Worksheet. The contents of first row of each worksheet as column name. Adding that, this module accept temporary table definition at "connect" method with "xl_vtbl". ex. my $hDb = DBI->connect( "DBI:Excel:file=dbdtest.xls", undef, undef, {xl_vtbl => {TESTV => { sheetName => 'TEST_V', ttlRow => 5, startCol => 1, colCnt => 4, datRow => 6, datLmt => 4, } } }); For more information please refer sample/tex.pl included in this distribution. Metadata The following attributes are handled by DBI itself and not by DBD::Excel, thus they all work like expected: Active ActiveKids CachedKids CompatMode (Not used) InactiveDestroy Kids PrintError RaiseError Warn (Not used) The following DBI attributes are handled by DBD::Excel: AutoCommit Always on ChopBlanks Works NUM_OF_FIELDS Valid after "$hSt->execute" NUM_OF_PARAMS Valid after "$hSt->prepare" NAME Valid after "$hSt->execute"; undef for Non-Select statements. NULLABLE Not really working, always returns an array ref of one's. Valid after "$hSt->execute"; undef for Non-Select statements. These attributes and methods are not supported: bind_param_inout CursorName LongReadLen LongTruncOk Additional to the DBI attributes, you can use the following dbh attribute: xl_fmt This attribute is used for setting the formatter class for parsing. xl_dir This attribute is used only with "data_sources" on setting the directory where Excel files ('*.xls') are searched. It defaults to the current directory ("."). xl_vtbl assumes specified area as a table. See sample/tex.pl. xl_skiphidden skip hidden rows(=row height is 0) and hidden columns(=column width is 0). See sample/thidden.pl. xl_ignorecase set casesensitive or not about table name and columns. Default is sensitive (maybe as SQL::Statement). See sample/thidden.pl. Driver private methods data_sources The "data_sources" method returns a list of '*.xls' files of the current directory in the form "DBI:Excel:xl_dir=$dirname". If you want to read the subdirectories of another directory, use my($hDr) = DBI->install_driver("Excel"); my(@list) = $hDr->data_sources( { xl_dir => '/usr/local/xl_data' } ); list_tables This method returns a list of sheet names contained in the $hDb->{file}. Example: my $hDb = DBI->connect("DBI:Excel:file=test.xls"); my @list = $hDb->func('list_tables'); TODO
More tests First of all... Type and Format The current version not support date/time and text formating. Joins The current version of the module works with single table SELECT's only, although the basic design of the SQL::Statement module allows joins and the likes. KNOWN BUGS
o There are too many TODO things. So I can't determind what is BUG. :-) AUTHOR
Kawai Takanori (Hippo2000) kwitknr@cpan.org Homepage: http://member.nifty.ne.jp/hippo2000/ (Japanese) http://member.nifty.ne.jp/hippo2000/index_e.htm (English) Wiki: http://www.hippo2000.net/cgi-bin/KbWiki/KbWiki.pl (Japanese) http://www.hippo2000.net/cgi-bin/KbWikiE/KbWiki.pl (English) SEE ALSO
DBI, Spreadsheet::WriteExcel, Spreadsheet::ParseExcel, SQL::Statement COPYRIGHT
Copyright (c) 2001 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.8.8 2008-03-01 Excel(3pm)
All times are GMT -4. The time now is 05:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy