04-12-2019
I have 30 csv/excel file, all the excel file has the data similar to the one I mentioned above. So I need to copy column 1 and 5 from all the files and pasted in a new excel file next to next column. All 1 and 5 columns copied from the multiples files to be pasted in columns wise into a new excel file. I need to have all 1 and 5 columns data in a new excel sheet.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I need to paste each 10 lines of single column to several columns.
Please, can anyone tell me how to write in awk?
Input File:
22
34
36
12
17
19
15
11
89
99
56
38
29 (4 Replies)
Discussion started by: nica
4 Replies
2. Shell Programming and Scripting
Please help me. This is simple, but urgent problem for me. :(
I have a two files
file1
1 2 3 4 5 6
1 2 3 4 5 6
1 2 3 4 5 6
.....
file2
11 12 13 14 15
11 12 13 14 15
11 12 13 14 15
.....
1) I hope to make a new file, file 3, that consists of 2nd... (2 Replies)
Discussion started by: exsonic
2 Replies
3. UNIX for Advanced & Expert Users
Hi All,
I have a fixedwidth file of length 3000. Now i want to copy a column of 4 chars i.e( length 1678-1681) to column 1127 – 1171 to the same file.
Please let me know how can i achive using a single command in fixed width file.
Also source column length is 4 chars and target column length... (4 Replies)
Discussion started by: kiranparsha
4 Replies
4. UNIX for Dummies Questions & Answers
Any shortcuts for doing this? I need to cut the column 4 values from File1 and paste them as column4 values of File2, but only for the (first) same number of lines as File1 . All rows in File1 are contained in File2 in the exact same order, so the cut paste should work.
File1 (with header and 3... (4 Replies)
Discussion started by: senhia83
4 Replies
5. Shell Programming and Scripting
Hello, I have a script extracting columns of useful numbers from a data file, and manipulating the numbers with awk commands. I have problems with my script...
1. There are two lines assigning numbers to $BaseForAveraging. If I use the commented line (the first one) and let the second one... (9 Replies)
Discussion started by: vgbraymond
9 Replies
6. Shell Programming and Scripting
Hi all,
I've multiple files. In this case 5. Space separated columns. Each file has 12 columns. Each file has 300-400K lines.
I want to get the output such that if a value in column 2 is present in all the files then get all the columns of that value and print it side by side.
Desired output... (15 Replies)
Discussion started by: genome
15 Replies
7. Shell Programming and Scripting
#cat data.txt
file1 folder1
file2 thisforfile2
file3 thisfolderforfile3
lata4 folder4
step 1: create the folder first in column 2
for i in `awk '{print $2}' data.txt`
do
mkdir /home/data/$i
done
step 2: locate the files in column1 and stored them into a file
for i in... (17 Replies)
Discussion started by: kenshinhimura
17 Replies
8. UNIX for Beginners Questions & Answers
Source Code of the original script is down below please run the script and try to solve this problem
this is my data and I want it column wise
2019-03-20 13:00:00:000
2019-03-20 15:00:00:000
1
Operating System
LAB
0
1
1
1
1
1
1
1
1
1
0
1 (5 Replies)
Discussion started by: Shubham1182
5 Replies
9. UNIX for Beginners Questions & Answers
Dear all
I have a multiple directories, say for example org1, org2, org3 ..... org100 and each directory having a file namely dnaG.fasta. I need to copy all the dnaG.fasta file from each directory and paste in another directory fastconcatg. Therefore, my script has to copy dnaG.fasta file from... (5 Replies)
Discussion started by: dineshkumarsrk
5 Replies
10. UNIX for Beginners Questions & Answers
I have number of csv files (like tmo_2019*). In these files some files have 5th column value as V. I want to copy those files having 5th column value as V to specific directory /test/V_files/.
I tried to extract file names by below but not able to complete command for copy.
find -type f -iname... (4 Replies)
Discussion started by: Bops
4 Replies
LEARN ABOUT DEBIAN
spreadsheet::xlsx::utility2007
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)