Sponsored Content
Top Forums Shell Programming and Scripting Issues in the Format in excel file generated from unix machine Post 302150590 by robsonde on Tuesday 11th of December 2007 11:10:33 PM
Old 12-12-2007
Quote:
Originally Posted by Smiling Dragon
You could either tell excel that the column is text or just put " symbols round the number.
I think Dragon is on to the right answer.

if Excel finds stuff in quotes it should keep it as text.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to format excel sheets in UNIX??

Hi, I have generated an excel sheet using a shell script. i have converted the output text file to an excel and got the desired output. However, in a particular column in the excel the values of the numbers start with 0. e.g. 078393343, 00342442, etc. But, in the resulting excel I get as... (2 Replies)
Discussion started by: Vijay06
2 Replies

2. Programming

how to add CRLF support for CSV file generated in unix

Helo, my server side system is running on a redhat linux o.s. I have c program on the server which export list file into CSV format. now, I want that my program on server side is able to add support for CRLF(carriage return Line feed)into csv file format. so how do i write C program whcih... (3 Replies)
Discussion started by: amitpansuria
3 Replies

3. HP-UX

Conver Excel file to another format ( text)

I can convert a excel file to another format , for example text type ( TXT) whit anoter caracter from delimiter a rows ??? I can change the default delimiter " | " ( or space ) of cell to another caracter ( for example @@ or ## ) without change the other space ??? (6 Replies)
Discussion started by: ZINGARO
6 Replies

4. UNIX for Dummies Questions & Answers

Save Excel file as .txt in UNIX format

I have some files created in Excel that have to be saved as .txt files in order to load them into our accounting system. I can save the files as .txt files through Excel, but I then have to open them in TextPad and do a save as to change the Format from PC to UNIX. Is there a way to skip this step... (2 Replies)
Discussion started by: jroyalty
2 Replies

5. Shell Programming and Scripting

Retaining the Unix CSV format in Excel format while exporting

Hi All, I have created a Unix Shell script whch creates a *.csv file and export it to Excel. The problem i am facing is that Users wants one of the AMOUNT field in comma separted values. Example : if the Amount has the value as 3000000 User wants to be in 3,000,000 format. This Amount format... (2 Replies)
Discussion started by: rawat_me01
2 Replies

6. Shell Programming and Scripting

Help with selecting column with awk for a txt file generated by excel

I am new to scripting/programming, so I apologize for any novice questions. I have a tab delimited text file that was saved from excel xls file. I am trying to select only the third column using awk command. My command line is as below: cat test.txt | awk '{print $3}' However, above... (8 Replies)
Discussion started by: SangLad
8 Replies

7. 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

8. UNIX for Advanced & Expert Users

How to export Result to Excel Tabular format from UNIX?

Hi I am working on a script in which I am firing a query on database through Unix and getting the result set. I want to export that in an excel file. I am able to do so nut the result are exported horizontally one below the other. Can anyone plss help me out in exporting the Result in Tabular... (4 Replies)
Discussion started by: Saritau3
4 Replies

9. Shell Programming and Scripting

Script to generate Excel file or to SQL output data to Excel format/tabular format

Hi , i am generating some data by firing sql query with connecting to the database by my solaris box. The below one should be the header line of my excel ,here its coming in separate row. TO_CHAR(C. CURR_EMP_NO ---------- --------------- LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies

10. UNIX for Beginners Questions & Answers

How to change the format of an Excel from exponential to text through UNIX command?

How to change the format of an excel from exponential to text through UNIX command We have a pipe delimited file in which one particular A column is a combination of number+text and while converting into excel using tr command it is generating a exponential data for the A column. Kindly... (2 Replies)
Discussion started by: AbiramiRaja
2 Replies
Spreadsheet::XLSX::Utility2007(3pm)			User Contributed Perl Documentation		       Spreadsheet::XLSX::Utility2007(3pm)

NAME
Spreadsheet::XLSX::Utility2007 - Utility function for Spreadsheet::XLSX SYNOPSIS
use strict; #Declare use Spreadsheet::XLSX::Utility qw(ExcelFmt ExcelLocaltime LocaltimeExcel); #Convert localtime ->Excel Time my $iBirth = LocaltimeExcel(11, 10, 12, 23, 2, 64); # = 1964-3-23 12:10:11 print $iBirth, " "; # 23459.5070717593 #Convert Excel Time -> localtime my @aBirth = ExcelLocaltime($iBirth, undef); print join(":", @aBirth), " "; # 11:10:12:23:2:64:1:0 #Formatting print ExcelFmt('yyyy-mm-dd', $iBirth), " "; #1964-3-23 print ExcelFmt('m-d-yy', $iBirth), " "; # 3-23-64 print ExcelFmt('#,##0', $iBirth), " "; # 23,460 print ExcelFmt('#,##0.00', $iBirth), " "; # 23,459.51 print ExcelFmt('"My Birthday is (m/d):" m/d', $iBirth), " "; # My Birthday is (m/d): 3/23 DESCRIPTION
Spreadsheet::XLSX::Utility exports utility functions concerned with Excel format setting. ExcelFmt is used by Spreadsheet::XLSX::Fmt2007.pm which is used by Spreadsheet::XLSX. Functions This module can export 3 functions: ExcelFmt, ExcelLocaltime and LocaltimeExcel. ExcelFmt $sTxt = ExcelFmt($sFmt, $iData [, $i1904]); $sFmt is a format string for Excel. $iData is the target value. If $flg1904 is true, this functions assumes that epoch is 1904. $sTxt is the result. For more detail and examples, please refer sample/chkFmt.pl in this distribution. ex. ExcelLocaltime ($iSec, $iMin, $iHour, $iDay, $iMon, $iYear, $iwDay, $iMSec) = ExcelLocaltime($iExTime [, $flg1904]); ExcelLocaltime converts time information in Excel format into Perl localtime format. $iExTime is a time of Excel. If $flg1904 is true, this functions assumes that epoch is 1904. $iSec, $iMin, $iHour, $iDay, $iMon, $iYear, $iwDay are same as localtime. $iMSec means 1/1,000,000 seconds(ms). LocaltimeExcel $iExTime = LocaltimeExcel($iSec, $iMin, $iHour, $iDay, $iMon, $iYear [,$iMSec] [,$flg1904]) LocaltimeExcel converts time information in Perl localtime format into Excel format . $iSec, $iMin, $iHour, $iDay, $iMon, $iYear are same as localtime. If $flg1904 is true, this functions assumes that epoch is 1904. $iExTime is a time of Excel. col2int $iInt = col2int($sCol); converts a excel row letter into an int for use in an array This function was contributed by Kevin Mulholland. int2col $sCol = int2col($iRow); convert a column number into column letters NOET: This is quite a brute force coarse method does not manage values over 701 (ZZ) This function was contributed by Kevin Mulholland. sheetRef ($iRow, $iCol) = sheetRef($sStr); convert an excel letter-number address into a useful array address NOTE: That also Excel uses X-Y notation, we normally use Y-X in arrays $sStr, excel coord (eg. A2). This function was contributed by Kevin Mulholland. xls2csv $sCsvTxt = xls2csv($sFileName, $sRegion, $iRotate); convert a chunk of an excel file into csv text chunk $sRegions = "sheet-colrow:colrow" (ex. '1-A1:B2' means 'A1:B2' for sheet 1) $iRotate = 0 or 1 (output should be rotated or not) This function was contributed by Kevin Mulholland. AUTHOR
Rob Polocz rob.polocz@trackvia.com based on work by for Spreadsheet::ParseExcel by Kawai Takanori (Hippo2000) used with permission SEE ALSO
Spreadsheet::ParseExcel, Spreadsheet::WriteExcel COPYRIGHT
This module is part of the Spreadsheet::XLSX distribution. perl v5.10.1 2010-05-16 Spreadsheet::XLSX::Utility2007(3pm)
All times are GMT -4. The time now is 12:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy