Sponsored Content
Top Forums Shell Programming and Scripting Perl script to modify csv file Post 302833671 by DGPickett on Wednesday 17th of July 2013 03:11:27 PM
Old 07-17-2013
If you process cell by cell (column by column), you can call isquoted() to determine if you need to print quotes. You can print the stuff ahead and before each row in the row loop. You can print stuff before and after the table in the main.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help to modify perl script: Text file with line and more than 1 space

Dear Friends, I am beginner in Perl and trying to find the problem in a script. Kindly help me to modify the script. My script is not giving the output for the last field and followed text (LA: Language English). Input file & script as follows: Input file: Thu Mar 19 2:34:14 EDT 2009 STC... (3 Replies)
Discussion started by: srsahu75
3 Replies

2. Shell Programming and Scripting

Simple Script needed for Processing CSV file perl

I am new to perl, and need a script to pull a CSV file, strip out 2 leading columns, and 2 ending columns, and resave the file in a new location. The file is basic and has less than 10,000 records. Secondly, can I schedule perl scripts to run daily? Can someone provide the basic script to... (1 Reply)
Discussion started by: cobbjob
1 Replies

3. Shell Programming and Scripting

Need to modify csv-file with bash script

Hi Guys, I need to write a script, that exports the "moz_places" table of the "places.sqlite"-file (firefox browser history) into a csv-file. That part works. After the export, my csv looks like this: ... 4429;http://www.sqlite.org/sqlite.html;"Command Line Shell For... (11 Replies)
Discussion started by: Sebi0815
11 Replies

4. Shell Programming and Scripting

Please do help: Perl Script to pull out rows from a CSV file

I have CSV file that contains data in the format as shown below: ABC, 67, 56, 67, 78, 89, 76, 55 PDR, 85, 83, 83, 72, 82, 89, 83 MPG, 86, 53, 54, 65, 23, 54, 75 .. .. .. .. I want to create a script that will pull out the rows from the above sheet and paste it into another CSV file.... (12 Replies)
Discussion started by: pankajusc
12 Replies

5. Shell Programming and Scripting

Perl - need script for modify lines

Hello, does somebody can make script for me, which replace: ąćę ąćę ąćę (input file) to ace;|;ąćę ace;|;ąćę ace;|;ąćę (output file) (3 Replies)
Discussion started by: Xadrian
3 Replies

6. Shell Programming and Scripting

Read data from .csv file through shell script & modify

I need to read data from a file called "test.csv" through shell script where the file contains values like name,price,descriptor etc. There are rows where descriptor (& in some rows name) are written as string & other characters like "car_+" OR "bike*" etc where it should contains strings like... (3 Replies)
Discussion started by: raj100
3 Replies

7. Shell Programming and Scripting

Calculate average from CSV file using PERL script

Hi All I have this csv file and I need to calculate the average of FPS. FPS:27.7420, Interval:1314184238772 FPS:25.9798, Interval:1314184242646 FPS:27.4772, Interval:1314184246311 FPS:26.1623, Interval:1314184250159 FPS:26.4515, Interval:1314184253972 FPS:31.5896, Interval:1314184257163... (24 Replies)
Discussion started by: sayachop
24 Replies

8. Shell Programming and Scripting

Calling Pl/sql function in shell script to modify csv

I need to 1.Open a csv 2.Process the csv i.e. Modify 2 column in the csv. To modify the column the value needs to be passed to a pl/sql function and the return value should be updated For eg: If column 2 E,then E will be passed in database function which will return Employee. 3. Write a... (5 Replies)
Discussion started by: Chinky23
5 Replies

9. Shell Programming and Scripting

Perl script to Convert XLSX or XLS files to CSV file

Hi All, I've got in a situation where I need to convert .xlsx or .xls formatted files into simple text file or .csv file. I've found many options but doing this using PERL script is the best way I believe.I'm in AIX box. Perl code should have 2 params while running. i.e perl... (1 Reply)
Discussion started by: manab86
1 Replies

10. Shell Programming and Scripting

Modify CSV file

Hi, I would like to change my CSV file by adding " and : and moving some of the information around. the CSV file looks as follows: 501254424;500440257;PE PACKS;300467279;PREP;;276476070;655031001867176;Two Block;Olga;25/12/2015 00:00:00;Olga I would like to move the field 7 to the front "... (13 Replies)
Discussion started by: omuhans123
13 Replies
Excel::Template::Element::Cell(3pm)			User Contributed Perl Documentation		       Excel::Template::Element::Cell(3pm)

NAME
Excel::Template::Element::Cell - Excel::Template::Element::Cell PURPOSE
To actually write stuff to the worksheet NODE NAME
CELL INHERITANCE
ELEMENT ATTRIBUTES
o TEXT This is the text to write to the cell. This can either be text or a parameter with a dollar-sign in front of the parameter name. o COL Optionally, you can specify which column you want this cell to be in. It can be either a number (zero-based) or an offset. See Excel::Template for more info on offset-based numbering. o REF Adds the current cell to the a list of cells that can be backreferenced. This is useful when the current cell needs to be referenced by a formula. See BACKREF and RANGE. o WIDTH Sets the width of the column the cell is in. The last setting for a given column will win out. o TYPE This allows you to specify what write_*() method will be used. The default is to call write() and let Spreadsheet::WriteExcel make the right call. However, you may wish to override it. Excel::Template will not do any form of validation on what you provide. You are assumed to know what you're doing. The legal types (taken from Spreadsheet::WriteExcel) are: o COMMENT Add a comment to the cell o blank o formula o number o string o url o date_time other write_* methods as defined defined Spreadsheet::WriteExcel would be integrated by request CHILDREN
FORMULA EFFECTS
This will consume one column in the current row. DEPENDENCIES
None USAGE
<cell text="Some Text Here"/> <cell>Some other text here</cell> <cell text="$Param2"/> <cell>Some <var name="Param"> text here</cell> In the above example, four cells are written out. The first two have text hard-coded. The second two have variables. The third and fourth items have another thing that should be noted. If you have text where you want a variable in the middle, you have to use the latter form. Variables within parameters are the entire parameter's value. Please see Spreadsheet::WriteExcel for what constitutes a legal formula. AUTHOR
Rob Kinyon (rob.kinyon@gmail.com) SEE ALSO
ROW, VAR, FORMULA perl v5.14.2 2012-04-29 Excel::Template::Element::Cell(3pm)
All times are GMT -4. The time now is 08:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy