Merge cells in CSV file
Hi,
To create header for CSV , we are using table data.
Select h1 from tab1 where SUB_HEADER in('AA','AB','AC','AD');
o/p is
A,A,A,AHere AA,AB,AC,AD are sub headers and A is header.
When am creating CSV file using these,A is coming in each cell of first row.
A A A A
AA AB Ac AD
data........But I need to merge all those duplicates into single cell as below and remaining same
A
AA AB AC AD
data.....Edited by: 925896 on Feb 12, 2013 9:28 PM
You should explain how you want the data displayed
A
+---------------+
|A |
+---+---+---+---+
|AA |AB |AC |AD |
+---+---+---+---+
B
+---+---+---+---+
|A | | | |
+---+---+---+---+
|AA |AB |AC |AD |
+---+---+---+---+
C
+---------------+
|A |
+---+---+---+---+
|AA AB AC AD |
+---+---+---+---+As Jeneesh said above A is not possible with CSV format.
For B you need the solution with NULL values suggested by Jeneesh.
For C you need the solution with string-aggregation suggested by ranit B.
Regards
Marcus
Similar Messages
-
Query specific cell in csv file
Hello
I'm downloading a csv file daily. I need to extract a value that is in row 30 and 11th column.
I'f you open the csv in Excel it has headers for the columns and the specificis
Right now im using
<cfftp action = "getFile"
server = "#remoteFileLocation#"
port="21"
username="anonymous"
password=""
connection = "MyConn"
passive = "Yes"
localFile="D:\Inetpub\localFile.csv"
remoteFile="Future.csv"
failifexists="no">
Did it succeed? <cfoutput>#cfftp.succeeded#</cfoutput>
<cfftp action="close" connection="MyConn">
<h1>Populate cpr table - future.csv</h1>
<cfhttp url="http://www.website.com/future.csv"
method="GET"
name="qStockItems"
delimiter=","""
firstrowasheaders="yes"
columns="PRODUCT,CONTRACT_MONTH,CONTRACT_YEAR,CONTRACT_DAY,CONTRACT,PRODUCT_DESCRIPTION,OP EN,HIGH,HIGH_AB_INDICATOR,LOW,LOW_AB_INDICATOR,LAST,LAST_AB_INDICATOR,SETTLE,PT_CHG,EST_VO L,PRIOR_SETTLE,PRIOR_VOL,PRIOR_INT,TRADEDATE">
</cfhttp>
<cfloop query="qStockItems" startrow="30" endrow="30">
<!--- <cfloop from="1" to="40" index="i">--->
<cfquery datasource="wire" name="addrecord">
UPDATE cpr
SET PRODUCT = '#qStockItems.PRODUCT#',
CONTRACT_MONTH = #qStockItems.CONTRACT_MONTH#,
CONTRACT_YEAR = #qStockItems.CONTRACT_YEAR#,
SETTLE = #qStockItems.SETTLE#,
TRADEDATE = '#qStockItems.TRADEDATE#'
</cfquery>
<!--- </cfloop>--->
</cfloop>
<cfoutput>#qStockItems.tradedate#</cfoutput>
I'd like to retrieve the latest contract for copper, which is the first HG in column 1.
If anyone can please chime in on the best programing technique to get the cell that contains the first time HG is in column 1 and then the value of its 11th column.
Thanks for your input!
PRODUCT SYMBOL
CONTRACT MONTH
CONTRACT YEAR
CONTRACT DAY
CONTRACT
PRODUCT DESCRIPTION
OPEN
HIGH
HIGH AB INDICATOR
LOW
LOW AB INDICATOR
LAST
LAST AB INDICATOR
SETTLE
PT CHG
EST. VOL
PRIOR SETTLE
PRIOR VOL
PRIOR INT
TRADEDATE
GC
12
2012
GCZ12
Gold Futures
1719.6
1729
1717.7
1727.2
10.7
65295
1716.5
276136
35289
11/29/2012
GC
1
2013
GCF13
Gold Futures
1720.4
1729
1719.8
1728.3
10.6
633
1717.7
2607
1437
11/29/2012
GC
2
2013
GCG13
Gold Futures
1722.4
1731.2
1720.1
1727.1
1729.5
10.7
177804
1718.8
196208
272660
11/29/2012
GC
4
2013
GCJ13
Gold Futures
1724
1732.1
1723.2
1731.6
10.8
2004
1720.8
6042
29539
11/29/2012
GC
6
2013
GCM13
Gold Futures
1726.5
1734
1725.2
1733.7
10.8
2167
1722.9
2463
29132
11/29/2012
GC
8
2013
GCQ13
Gold Futures
1732.8
1735.8
1731.8
1735.6
10.8
284
1724.8
891
17333
11/29/2012
GC
10
2013
GCV13
Gold Futures
1730.2
1736.5
1730.2
1737.6
10.9
9
1726.7
56
9505
11/29/2012
GC
12
2013
GCZ13
Gold Futures
1733.5
1740.1
1733
1739.7
10.9
1337
1728.8
1614
19489
11/29/2012
GC
2
2014
GCG14
Gold Futures
1733.8
1742.3
1733.8
1742.1
10.9
23
1731.2
38
2502
11/29/2012
GC
4
2014
GCJ14
Gold Futures
1744.1
1744.3
1744.1
1744.5
10.9
67
1733.6
39
3438
11/29/2012
GC
6
2014
GCM14
Gold Futures
1747
10.9
139
1736.1
101
9119
11/29/2012
GC
8
2014
GCQ14
Gold Futures
1749.5
10.9
0
1738.6
84
11/29/2012
GC
10
2014
GCV14
Gold Futures
1752
0
0
11/29/2012
GC
12
2014
GCZ14
Gold Futures
1748.2
1754.7
1748.2
1754.5
10.8
162
1743.7
71
5274
11/29/2012
GC
6
2015
GCM15
Gold Futures
1762.8
10.7
70
1752.1
18
5747
11/29/2012
GC
12
2015
GCZ15
Gold Futures
1770
1770
1770
1771.3
10.4
706
1760.9
10
8606
11/29/2012
GC
6
2016
GCM16
Gold Futures
1780.3
10.3
0
1770
227
11/29/2012
GC
12
2016
GCZ16
Gold Futures
1789.7
10.2
0
1779.5
14
2221
11/29/2012
GC
6
2017
GCM17
Gold Futures
1803.2
8.9
100
1794.3
446
11/29/2012
GC
12
2017
GCZ17
Gold Futures
1819.3
8.9
0
1810.4
66
11/29/2012
GC
6
2018
GCM18
Gold Futures
1840.7
8.9
0
1831.8
15
11/29/2012
GCT
2
2013
GCTG13
Gold Tas Futures
0
0.1
-0.1
0
UNCH
490
0
11/29/2012
GVF
2
2013
GVFG13
Gold Volatility Index (vix) Futures
14
-0.43
0
14.43
11/29/2012
GVF
4
2013
GVFJ13
Gold Volatility Index (vix) Futures
15.53
-0.37
0
15.9
11/29/2012
GVF
6
2013
GVFM13
Gold Volatility Index (vix) Futures
16.57
-0.33
0
16.9
11/29/2012
GVF
8
2013
GVFQ13
Gold Volatility Index (vix) Futures
17.72
-0.29
0
18.01
11/29/2012
GVF
10
2013
GVFV13
Gold Volatility Index (vix) Futures
18.25
-0.42
0
18.67
11/29/2012
GVF
12
2013
GVFZ13
Gold Volatility Index (vix) Futures
19.29
-0.2
0
19.49
11/29/2012
HG
12
2012
HGZ12
Copper Futures
3.5285
3.606
3.524
3.5885
0.064
15535
3.5245
45023
12399
11/29/2012
HG
1
2013
HGF13
Copper Futures
3.5355
3.6125
3.5355
3.598
0.0665
1001
3.5315
449
2338
11/29/2012
HG
2
2013
HGG13
Copper Futures
3.555
3.617
3.555
3.6015
0.067
382
3.5345
284
1253
11/29/2012
HG
3
2013
HGH13
Copper Futures
3.5425
3.622
3.5375
3.62
3.6055
0.068
63145
3.5375
33116
93576
11/29/2012
HG
4
2013
HGJ13
Copper Futures
3.5665
3.6265
3.5665
3.6105
0.068
26
3.5425
28
645
11/29/2012
HG
5
2013
HGK13
Copper Futures
3.5465
3.6295
3.5465
3.6135
0.068
1808
3.5455
1069
12823
11/29/2012
HG
6
2013
HGM13
Copper Futures
3.6
3.6
3.6
3.6175
0.068
11
3.5495
16
495
11/29/2012
HG
7
2013
HGN13
Copper Futures
3.5585
3.6365
3.5585
3.6205
0.068
832
3.5525
173
5990
11/29/2012
HG
8
2013
HGQ13
Copper Futures
3.623
0.0675
4
3.5555
5
467
11/29/2012
HG
9
2013
HGU13
Copper Futures
3.61
3.637
3.61
3.625
0.0675
445
3.5575
43
3324
11/29/2012
HG
10
2013
HGV13
Copper Futures
3.627
0.0675
0
3.5595
5
498
11/29/2012
HG
11
2013
HGX13
Copper Futures
3.629
0.0675
0
3.5615
13
474
11/29/2012
HG
12
2013
HGZ13
Copper Futures
3.6405
3.6405
3.63
3.63
3.6305
0.0675
84
3.563
40
4244
11/29/2012
HG
1
2014
HGF14
Copper Futures
3.6325
0.0675
0
3.565
279
11/29/2012
HG
2
2014
HGG14
Copper Futures
3.634
0.0675
0
3.5665
32
11/29/2012
HG
3
2014
HGH14
Copper Futures
3.635
0.0675
1
3.5675
3
91
11/29/2012
HG
4
2014
HGJ14
Copper Futures
3.6355
0.0675
0
3.568
11/29/2012
HG
5
2014
HGK14
Copper Futures
3.636
0.0675
0
3.5685
11/29/2012
HG
6
2014
HGM14
Copper Futures
3.6345
0.0675
0
3.567
11/29/2012Thanks for the reply Dan
The problem is the HG for the current month can be on either the 30th row.. 31st row... i dont know the row number for the current month.. but I do know it will be the first time HG is in column 1
Thanks -
Query on formating CSV file.
Hi All,
According to my business logic i need to read data from DataBase and need to create CSV file to represent that data. I am able to create CSV file. But i want to format the cells of the CVS file. means like, i want to change the back groung color of a cell. Is it possible to do changes to the cells of CSV file through JAVA program?.
Regards,
Naga.A CSV is, as definition, a comma separated values format.
It can contain only text and you cannot give any formatting definition, neither via Java nor via an editor. -
Excel auto formats cell in CSV flat file.
Hi,
I am using an etext template to generate a CSV file (comma separated) and that piece works fine. But as soon as you open the generated file in Excel, it changes the format of one of the columns to a date! And once you have opened it in Excel, saving it changes the column value, so now I have wrong data!
The field value is : 8050-09-7 (Alpha)
When opened in Excel, it becomes: 9/7/8050 (Excel auto formats it)
If I save the file as a .xls file and not a .csv file, it works, but now when I open it, the entire row shows up in one line in Excel and each field is not in each cell.
The user wants to see the output first, verify the data and save it as a CSV file and export it to a vendor software.
Any ideas?
Thanks,
ShafHi Steven,
I think I understand what you are trying to say.
My data is getting generated initially as XML; I merge it with my eText template to get the final output. If I save the output as .txt, its fine. But users have a hard time reading comma delimited lines, though it will work fine for the customers.
<G_COMPONENTS>
<ID>12215</ID>
<PRODUCT_ID>379-9006-00</PRODUCT_ID>
*<CAS_NUMBER>8050-09-7</CAS_NUMBER>*
<CHEMICAL_NAME>GUM ROSIN</CHEMICAL_NAME>
<SUPPLIER>Name</SUPPLIER>
<PERCENT_WEIGHT>0</PERCENT_WEIGHT>
<PERCENT_VOLUME>0</PERCENT_VOLUME>
</G_COMPONENTS>
Thanks,
Shaf -
Is there a way to name the .indd files created by a data merge with values in the CSV file
I have a data merge document that is set to single Record per Document page and 1 page per document. In my CSV file I have a field for Part Number. If I run a data merge with 10 records I end up with 10 .indd files. I need a way so that the resulting .indd files are named the same value that is in the Part Number field.
Loic has provided a link for my original piece, and I've written up some follow-up pieces for indesignsecrets.com:
http://indesignsecrets.com/data-merging-individual-records-separate-pdfs.php
http://indesignsecrets.com/data-merging-individual-records-separate-pdfs-part-2-scripting. php
So there are several ways to get unique name PDFs from an indesign Data Merge. However, none of these 3 articles will truly answer your question of how to get unique indesign filenames using the database. I can see a practical purpose for this as merging business cards directly to PDFs is great, but I can be guaranteed that while on proof, there will be alts to the business cards that need to be done outside the merge, meaning specific records need to be exported to indesign files for further manipulation. -
How to update a specific cell value in a CSV file.
Hi
I would like to know whether it is possible in openscript to update a cell value of the CSV file.
For example if the test script requires to update the cell of 6th row and 8th column, then how to achieve through openscript API?
Please kindly let me know.Hi,
Hope this helps!
Table table;
String[] rowvalus;
int targetRow=5,targetColumn=7;
* Note: Rows and columns are 0-based index.
table =utilities.loadCSV("C:\OracleATS\OFT\DataBank\Test.csv");
rowvalus=table.getRows().get(targetRow).getAll();
info("Before change :"+rowvalus[targetColumn]);
rowvalus[targetColumn]="NewValue";
utilities.saveCSV(table, "C:\OracleATS\OFT\DataBank\Test.csv", true);
table =utilities.loadCSV("C:\OracleATS\OFT\DataBank\Test.csv");
rowvalus=table.getRows().get(targetRow).getAll();
info("After change :"+rowvalus[targetColumn]);
Note:- Please first take the backup of your CSV file before using this code snippet
Thanks
-POPS -
Script to merge multiple CSV files together with no duplicate records.
I like a Script to merge multiple CSV files together with no duplicate records.
None of the files have any headers and column A got a unique ID. What would be the best way to accomplish that?OK here is my answer :
2 files in a directory with no headers.
first column is the unique ID, second colomun you put whatever u want
The headers are added when using the import-csv cmdlet
first file contains :
1;a
2;SAMEID-FIRSTFILE
3;c
4;d
5;e
second file contains :
6;a
2;SAMEID-SECONDFILE
7;c
8;d
9;e
the second file contains the line : 2;b wich is the same in the first file
the code :
$i = 0
Foreach($file in (get-childitem d:\yourpath)){
if($i -eq 0){
$ref = import-csv $file.fullname -Header id,value -Delimiter ";"
}else{
$temp = import-csv $file.fullname -Header id,value -Delimiter ";"
foreach($line in $temp){
if(!($ref.id.contains($line.id))){
$objet = new-object Psobject
Add-Member -InputObject $objet -MemberType NoteProperty -Name id -value $line.id
Add-Member -InputObject $objet -MemberType NoteProperty -Name value -value $line.value
$ref += $objet
$i++
$ref
$ref should return:
id
value
1
a
2
SAMEID-FIRSTFILE
3
c
4
d
5
e
6
a
7
c
8
d
9
e
(get-childitem d:\yourpath) -> yourpath containing the 2 csv file -
Merge cells in a column that looks like in an excel file?
Hello,
I have a file. xls shown in the image below, this file is automatically generated by script, I want to merge cells that I colored myself just to show you but in reality they are not colored, so i want to merge the cells that contain the same value, for example, the first cell FRS and the second cell FRS, i want to merge and write once FRS and the same for the other line of this column, knowing that this file is not fixed, it is possible that its contents change, then we can not fix the cells to merge.
thank you for your help
Here the example: [ http://www.developpez.net/forums/attachment.php?attachmentid=119608&stc=1&d=1369776340]
Edited by: 1008481 on May 28, 2013 4:11 PMCross posted
http://www.java-forums.org/advanced-java/74579-merge-cells-column-looks-like-excel-file.html
db -
Import a CSV file into specific cells
Hello,
I have created a simple Numbers template and I want to import a csv file with its values entering specific cells in an automated way.
I think the best way to automate this process would be an AppleScript that does the following:
Selects the csv file;
Parses the values inserting them into the the Numbers template i.e. value1 to cell B2, value2 to cell B3 etc.
Unfortunately I know very little about AppleScript, does anyone have any experience in this area that they could pass on?
My idea would be to place the csv values in an array, and loop through the array entering the values in B2, B3 etc.
Many thanks in advance!
DougieHere is a script doing the full job in a single call.
--{code}
--[SCRIPT csv-to-selected-cell]
Enregistrer le script en tant que Script : csv-to-selected-cell.scpt
déplacer le fichier ainsi créé dans le dossier
<VolumeDeDémarrage>:Utilisateurs:<votreCompte>:Bibliothèque:Scripts:Applications :Numbers:
Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
Sélectionner la première cellule du bloc où vous souhaitez insérer les valeurs extraites d'un fichier CSV.
Aller au menu Scripts , choisir Numbers puis choisir “csv-to-selected-cell”
Le script demande de naviquer jusqu’au fichier CSV.
Il en lit le contenu,
remplace les séparateurs (";" ou ",") par des TABs
copie les données dans le presse-papiers
colle dans la table.
--=====
L’aide du Finder explique:
L’Utilitaire AppleScript permet d’activer le Menu des scripts :
Ouvrez l’Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
Cochez la case “Afficher le menu des scripts dans la barre de menus”.
Sous 10.6.x,
aller dans le panneau “Général” du dialogue Préférences de l’Éditeur Applescript
puis cocher la case “Afficher le menu des scripts dans la barre des menus”.
--=====
Save the script as a Script: csv-to-selected-cell.scpt
Move the newly created file into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
Select the first cell of the block where values extracted from a CSV file must be inserted.
Go to the Scripts Menu, choose Numbers, then choose “csv-to-selected-cell”
The script urge you to navigate to the CSV file.
It read its contents,
replace the delimiters (";" or ",") by TAB chars
copy the datas in the clipboard
paste in the table.
--=====
The Finder’s Help explains:
To make the Script menu appear:
Open the AppleScript utility located in Applications/AppleScript.
Select the “Show Script Menu in menu bar” checkbox.
Under 10.6.x,
go to the General panel of AppleScript Editor’s Preferences dialog box
and check the “Show Script menu in menu bar” option.
--=====
Yvan KOENIG (VALLAURIS, France)
2012/01/18
--=====
on run
local dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2, lesValeurs
my activateGUIscripting()
Extract parameters describing the target cell *)
set {dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
Choose the source CSV file *)
choose file of type {"csv"}
Get the file’s contents *)
set lesValeurs to read result
Grab the delimiter in use *)
if lesValeurs contains ";" then
else
end if
Replace the delimiter in use by TAB *)
my remplace(lesValeurs, result, tab)
Move the 'normalized' datas to the clipboard *)
set the clipboard to result
Reset the target cell in case something changed *)
tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
set selection range to range (name of cell colNum1 of row rowNum1)
end tell
Paste matching style *)
my raccourci("Numbers", "v", "cas")
end run
--=====
set { dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
on get_SelParams()
local d_Name, s_Name, t_Name, row_Num1, col_Num1, row_Num2, col_Num2
tell application "Numbers" to tell document 1
set d_Name to its name
set s_Name to ""
repeat with i from 1 to the count of sheets
tell sheet i to set maybe to the count of (tables whose selection range is not missing value)
if maybe is not 0 then
set s_Name to name of sheet i
exit repeat
end if -- maybe is not 0
end repeat
if s_Name is "" then
if my parleAnglais() then
error "No sheet has a selected table embedding at least one selected cell !"
else
error "Aucune feuille ne contient une table ayant au moins une cellule sélectionnée !"
end if
end if
tell sheet s_Name to tell (first table where selection range is not missing value)
tell selection range
set {top_left, bottom_right} to {name of first cell, name of last cell}
end tell
set t_Name to its name
tell cell top_left to set {row_Num1, col_Num1} to {address of its row, address of its column}
if top_left is bottom_right then
set {row_Num2, col_Num2} to {row_Num1, col_Num1}
else
tell cell bottom_right to set {row_Num2, col_Num2} to {address of its row, address of its column}
end if
end tell -- sheet…
return {d_Name, s_Name, t_Name, row_Num1, col_Num1, row_Num2, col_Num2}
end tell -- Numbers
end get_SelParams
--=====
on parleAnglais()
local z
try
tell application "Numbers" to set z to localized string "Cancel"
on error
set z to "Cancel"
end try
return (z is not "Annuler")
end parleAnglais
--=====
on decoupe(t, d)
local oTIDs, l
set oTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to d
set l to text items of t
set AppleScript's text item delimiters to oTIDs
return l
end decoupe
--=====
replaces every occurences of d1 by d2 in the text t
on remplace(t, d1, d2)
local oTIDs, l
set oTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to d1
set l to text items of t
set AppleScript's text item delimiters to d2
set t to "" & l
set AppleScript's text item delimiters to oTIDs
return t
end remplace
--=====
on activateGUIscripting()
(* to be sure than GUI scripting will be active *)
tell application "System Events"
if not (UI elements enabled) then set (UI elements enabled) to true
end tell
end activateGUIscripting
--=====
==== Uses GUIscripting ====
This handler may be used to 'type' text, invisible characters if the third parameter is an empty string.
It may be used to 'type' keyboard raccourcis if the third parameter describe the required modifier keys.
I changed its name « shortcut » to « raccourci » to get rid of a name conflict in Smile.
on raccourci(a, t, d)
local k
activate application a
tell application "System Events" to tell application process a
set frontmost to true
try
t * 1
if d is "" then
key code t
else if d is "c" then
key code t using {command down}
else if d is "a" then
key code t using {option down}
else if d is "k" then
key code t using {control down}
else if d is "s" then
key code t using {shift down}
else if d is in {"ac", "ca"} then
key code t using {command down, option down}
else if d is in {"as", "sa"} then
key code t using {shift down, option down}
else if d is in {"sc", "cs"} then
key code t using {command down, shift down}
else if d is in {"kc", "ck"} then
key code t using {command down, control down}
else if d is in {"ks", "sk"} then
key code t using {shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "k" then
key code t using {command down, shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "a" then
key code t using {command down, shift down, option down}
end if
on error
repeat with k in t
if d is "" then
keystroke (k as text)
else if d is "c" then
keystroke (k as text) using {command down}
else if d is "a" then
keystroke k using {option down}
else if d is "k" then
keystroke (k as text) using {control down}
else if d is "s" then
keystroke k using {shift down}
else if d is in {"ac", "ca"} then
keystroke (k as text) using {command down, option down}
else if d is in {"as", "sa"} then
keystroke (k as text) using {shift down, option down}
else if d is in {"sc", "cs"} then
keystroke (k as text) using {command down, shift down}
else if d is in {"kc", "ck"} then
keystroke (k as text) using {command down, control down}
else if d is in {"ks", "sk"} then
keystroke (k as text) using {shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "k" then
keystroke (k as text) using {command down, shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "a" then
keystroke (k as text) using {command down, shift down, option down}
end if
end repeat
end try
end tell
end raccourci
--=====
--[/SCRIPT]
--{code}
Yvan KOENIG (VALLAURIS, France) mercredi 18 janvier 2012
iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
My Box account is : http://www.box.com/s/00qnssoyeq2xvc22ra4k
My iDisk is : http://public.me.com/koenigyvan -
Need to merge a csv file using external tables into a main table
Hi,
I have a csv file which contains the date(with time stamp), column1(number),column2(number), column3 (number). I am using external tables concept to load the data froom csv to this external table and then merging into the main table. Problem here is : the csv file is a system generated file and nothing can be edited under it. our aim is to automate this process of loading data from csv to the table. In this csv the date time stamp is not in the proper format.I mean the date is not visible and only minutes and seconds are visible.By changing the format in csv manually this can be overcome.but we donot need any manual intervention.
how can i overcome this problem ?? please help mee...
Excels data looks like:
(PDH-TSV 4.0) (India Standard Time)(-330) \\DISAPPSER01\Processor(_Total)\% Privileged Time \\DISAPPSER01\Processor(_Total)\% Processor Time \\DISAPPSER01\Web Service(_Total)\Current Connections
56:59.0 47
57:09.0 0.72379582 4.204561281 46
57:19.0 0.916548537 4.006179927 44
57:29.0 0.663034771 3.674662541 43
57:39.0 0.750789844 4.093933999 42
57:49.0 0.721538487 2.650858026 40
57:59.0 0.594781604 3.333393703 40please format your sample data giving header to the column so that we can make sense out of the values, also since the minutes and seconds are only given, what is the date to be considered for records to be moved to the master table, sysdate or will the date be passed as a parameter?
-
Line Feed within the cell in .CSV output file
Hello Experts,
I have created one z-report, and the output of the report is in .CSV file format separated by 'semi-colon' as separator.
Their is one column "Product" in which data is in the format
<b>"[Product1][Product2][Product3][Product4]"</b>
My code looks something like this:
LOOP AT product_new INTO wa_product.
CONCATENATE Prod_str
wa_product-tdline
INTO prod_str.
ENDLOOP.
Our requirment is to insert Line-feed between each product entries within the cell.Line-Feed between each product within the cell is possible with ALT+ENTER key
The output required is
"[Product1](ALT+ENTER)
[Product2](ALT+ENTER)
[Product3](ALT+ENTER)
[Product4]"
I would appreciate if anybody can help me to solve this.. (urgent)
Thanx.Hi
Go thru these links
Regarding line feed
add line feed to string
When you concatenate try using the abap char utility for newline as well.
i.e CL_ABAP_CHAR_UTILITIES=>NEWLINE.
LOOP AT product_new INTO wa_product.
CONCATENATE Prod_str
wa_product-tdline
CL_ABAP_CHAR_UTILITIES=>NEWLINE.
INTO prod_str.
ENDLOOP.
Regards,
balaji
**rewrds for helpful answers -
How would I merge two csv files in Powershell
Hello,
I have two CSV Files. Each has a list of virtual machines in them. One CSV file has the name of the VM as well as details about the RAM, CPU, VM Details (from VMM). The other CSV File has the name of the VM as well as the IP address.
How would I merge these two together? For any VM's that do not exist in either file I wouldn't want to drop these VM names either.
Thanks.Thank you mjolinor for your suggestion. This is not quite working for me. What I'm seeing in the csv3.csv file all the column details from the $firstCSV, and I'm seeing the headings included from the $secondCSV but all the details
of the headings from the $secondCSV are empty. Here is some more information for you:
My $firstCSV file has the following headings:
VMName ChargedWA BillingWA VMOperatingSystem VMHost vCPUs MemoryGB StorageGB
My $secondCSV file has the following headings:
VMName IPAddress SubnetMask Gateway DNSServers MACAddress device0 Totalspce0 freespce0 device1 Totalspce1 freespce1 device2 Totalspce2 freespce2
Each CSV input file has in common the column of VMName. Most values in VMName are common to both input files but there are some values in VMName that are not in the other input file. I'm looking to find the following:
When the same VMname exists in both files, write out all columns for that record from both files into the merged file.
When a VM name is in $firstCSV but not the second...still write out this record with the values from the $firstCSV. The column headings from the $secondCSV would be empty for this record.
When a VM name is in $secondCSV but not the first...still write out this record with the values from the $secondCSV. The column headings from the $firstCSV would be empty for this record.
It's funny how I think I've described my issue in my initial post but as I describe it more I further define the details. I hope I've described my issue for all to understand.
Thank you. -
Joining / Merging csv files into one
Hi,
is there a way to join or merger a bunch of csv files into
one file?
regards
MartinThx Dan, for the reply, well I have the reference manual
right in front of me, and I thought about using cffile, but my
experience has been that cffile is very slow so merging say like 20
- 30 files into one with 600 records in each would be somewhat time
consuming or if even possible? does anyone know?
regards
Martin -
I've downloaded Thunderbird and have imported all emails etc - works great!
BUT when I try to do a mail merge it doesn't work! I've saved my excel file as cvs and understand that I need to use {{Email}} , {{First Name}} etc
It just doesn't work for me - no emails in outbox or sent items?
any ideas please?can you confirm a few things?
You downloaded 'Mail Merge' and it is displayed in the Thunderbird 'Addon Manager' and it is enabled.
Open the .csv file and checked that the info you are entering in the Write message eg: {{Email}} , {{First Name}} etc is the same as the column headers.
example:
{{FirstName}} OR {{First Name}}
{{Email}} OR {{Primary Email}}
you can edit the .csv file to change eg: {{Primary Email}} to {{Email}}
you can also move the column headers, so that the first three columns show : First Name, Last Name, Email -
How to merge two columns in csv file using vbscript?
How i can merge two column in csv file using vbscript or powershell?
1 , 2 , 3 , 4 , 5
1 , 23 , 4 , 5
thanksHere are two examples
http://msdn.microsoft.com/en-us/library/ms191250.aspx
calulated
http://msdn.microsoft.com/en-us/library/ms191250.aspx
Gary Newman MCSE, MCT, CCNA, MCSD, MCPD, MCDBA, MCAD, MCSA, MCTS Developer and Administrator On SharePoint 2013 SharePoint Practice Manager for AmeriTeach Denver, CO.
Maybe you are looking for
-
Slow and lagging After Effects CS5.5
Hello! I've tried to add some effects and preview the video with AE CS5.5 but editin is very painful. I try to preview and my fps is from 3-14 fps. It's painful to edit. The editing video is 1280 x 720, 13min long and I've edited in Premiere Pro CS5.
-
Unable to open SYSTEM PROFILER
Hi all, I updated my software to 10.5.8. Since then i'm unable to open system profiler. Tried using the: a) option button > then click system profiler b) spotlight c) apple logo > abt this mac> Please help. Many thanks in advance
-
Contribute 6.5 is very slow to publish new content to our site www.mrii.ie, even bringing up a page for editing is slow. So far I have: Tested the the FTP settings using passive and active connections. Using an external FTP program, downloading from
-
How do i use the same apple ID and password for my mac mini, my ipod and my ipad?
how do i change my ipod touch apple id and password to be the same as my mac mini and my ipad? I cannot load updates any of my apps.
-
Patchset 10.2.0.5 (required for Windows 7 64-bit)
Am I right in thinking this isn't freely available - only access route I can find mentioned seems to be via some sort of support contract. Anyone know why Oracle is restricting access to this when 11 is available?