or add the content of one csv file into the next one.
I am sure this has been discussed already:
- I have tables from different webpages, which I received using table2clipboard (Thanks and greetings to Bob Hansen, here.)
- now they need to be added to an existing csv-file format, despite that they have different headers
This is actually a request for the basic handling of columns in csv files - avoiding Excel. Some columns need to be combined into one (like a; f; c; k; l; m etc.), others must be erased. It would not matter, to change the header directly in that finished file or to write into an existing one.
Any hints or links here welcome.
Combine two different csv files into one
Moderators: Dorian (MJT support), JRL
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Some lines
Well, this makes a rather difficult read I suppose or can one add an attachment, which I haven`t found out so far?
To answer the question, no I had not considered RegEx so far, since I mainly need to shift whole columnes. At least in this very first table. But having had a closer look at the next tables, I found out I might should do so, since one these tables has all the information (address of customer and order) crammed into a single field, divided only by headwords, so to speak.
item-name listing-id sku price shipping-fee quantity-purchased total-price purchase-date batch-id buyer-email buyer-name
Selbstwert und Kommunikation. Familientherapie für Berater und zur Selbsthilfe 0113G0I7X8V PSY1006N 8 3 1 11 30.01.2010 10:31:37 Europe/Berlin [email protected] Donald Duck
Pustekuchen! Lauter kulinarische Wortgeschichten [Taschenbuch] by Gutknecht... 1117EU2DW61 BEL62029N 2,2 3 1 5,2 30.01.2010 11:39:39 Europe/Berlin [email protected] Donald Duck
Der große Schlaf [Taschenbuch] by Chandler, Raymond; Ortlepp, Gunar 0113G0I7C0P KRI9701N 0,85 3 1 3,85 30.01.2010 18:16:23 Europe/Berlin [email protected] Donald Duck
Artikel Gesamtsumme der Bestellung E-Mail-Adresse des Käufers Kunde
Autor: Herman-Friede, Eugen Titel: Für Freudensprünge keine Zeit Erinnerungen an Illegalität und Aufbegehren 1942-1948 EUR 3,95 [email protected] Marcus PilarskiVVN-BdA e.V.
Autor: Titel: Schleswig-Holsteinischer Heimatkalender 1966 EUR 5,50 [email protected] christiane bösche
Autor: Bongiorni, Sara Titel: Ein Jahr ohne Made in China EUR 14,00 [email protected] Christian Golbs
To answer the question, no I had not considered RegEx so far, since I mainly need to shift whole columnes. At least in this very first table. But having had a closer look at the next tables, I found out I might should do so, since one these tables has all the information (address of customer and order) crammed into a single field, divided only by headwords, so to speak.
item-name listing-id sku price shipping-fee quantity-purchased total-price purchase-date batch-id buyer-email buyer-name
Selbstwert und Kommunikation. Familientherapie für Berater und zur Selbsthilfe 0113G0I7X8V PSY1006N 8 3 1 11 30.01.2010 10:31:37 Europe/Berlin [email protected] Donald Duck
Pustekuchen! Lauter kulinarische Wortgeschichten [Taschenbuch] by Gutknecht... 1117EU2DW61 BEL62029N 2,2 3 1 5,2 30.01.2010 11:39:39 Europe/Berlin [email protected] Donald Duck
Der große Schlaf [Taschenbuch] by Chandler, Raymond; Ortlepp, Gunar 0113G0I7C0P KRI9701N 0,85 3 1 3,85 30.01.2010 18:16:23 Europe/Berlin [email protected] Donald Duck
Artikel Gesamtsumme der Bestellung E-Mail-Adresse des Käufers Kunde
Autor: Herman-Friede, Eugen Titel: Für Freudensprünge keine Zeit Erinnerungen an Illegalität und Aufbegehren 1942-1948 EUR 3,95 [email protected] Marcus PilarskiVVN-BdA e.V.
Autor: Titel: Schleswig-Holsteinischer Heimatkalender 1966 EUR 5,50 [email protected] christiane bösche
Autor: Bongiorni, Sara Titel: Ein Jahr ohne Made in China EUR 14,00 [email protected] Christian Golbs
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
I was hoping to see a BEFORE and AFTER example showing the same data. The two "paragraphs" in the previous posting do not appear to be that.
If the info above is data in columns, what is the delimiter between the columns? Is it a Tab or s SPACE char or something else? Can you use another character like "_" or "~" if the forum has trouble displaying them? Display it in both the BEFORE and AFTER examples.
If the info above is data in columns, what is the delimiter between the columns? Is it a Tab or s SPACE char or something else? Can you use another character like "_" or "~" if the forum has trouble displaying them? Display it in both the BEFORE and AFTER examples.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
ZVAB Bestellnr.~Bestelleingang~Artikel
5789047~8. Februar 2010 00:25:44~Autor: Herman-Friede, Eugen Titel: Für Freudensprünge
5787952~7. Februar 2010 18:39:32~Autor: Titel: Schleswig-Holsteinischer
This is the header of the file to be imported, the delimiter is TAB, which I have replace with ~. I inserted empty lines to make it more obvious, where each line starts and ends. They are in columns, which I have shortened to explain how each file is built.
The first file looks very much the same, delimiter is also TAB. Thanks for any hint how to best tackle this one.
5789047~8. Februar 2010 00:25:44~Autor: Herman-Friede, Eugen Titel: Für Freudensprünge
5787952~7. Februar 2010 18:39:32~Autor: Titel: Schleswig-Holsteinischer
This is the header of the file to be imported, the delimiter is TAB, which I have replace with ~. I inserted empty lines to make it more obvious, where each line starts and ends. They are in columns, which I have shortened to explain how each file is built.
The first file looks very much the same, delimiter is also TAB. Thanks for any hint how to best tackle this one.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Still trying to clarify your needs:
Is this correct (using "~" for tabs)?
File 1:
ID~Date~Author~Publisher~Subject~Pages
123~12/27/1988~Fred~MacMillan~History~356
2345~02/13/2003~Mary~O'Reilly~Computers~87
File 2:
ID~Date~Pages~Subject:Author
437~07/23/2001~55~Marketing:Sally
Need to modify File 2 to have format like File 1 and append to the end of File 1?
---------------------------------------------
If yes, then we can use RegEx to move the positions of the File 2 data, and insert blank field as needed for the missing Publisher to make it the same format as File 1. Then just append File2 to File 1.
If No, then still need clarification of the problem.
Is this correct (using "~" for tabs)?
File 1:
ID~Date~Author~Publisher~Subject~Pages
123~12/27/1988~Fred~MacMillan~History~356
2345~02/13/2003~Mary~O'Reilly~Computers~87
File 2:
ID~Date~Pages~Subject:Author
437~07/23/2001~55~Marketing:Sally
Need to modify File 2 to have format like File 1 and append to the end of File 1?
---------------------------------------------
If yes, then we can use RegEx to move the positions of the File 2 data, and insert blank field as needed for the missing Publisher to make it the same format as File 1. Then just append File2 to File 1.
If No, then still need clarification of the problem.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!