how to re-arrange spreadsheet (CSV) data
by SaintDanBert from LinuxQuestions.org on (#6CPCJ)
Does anyone have tips and hints for re-arranging the data among several CSV spreadsheets?
I have collected several CVS spreadsheets. All that the same information. However, the row-1 names are different and in variously different order.
A trivial example of differences might be:
I'm hoping that someone has an algorithm or other method so that I might program along the following lines:
~~~ 0;-Dan
I have collected several CVS spreadsheets. All that the same information. However, the row-1 names are different and in variously different order.
A trivial example of differences might be:
sheet #1 ----- LastName,FirstName,Initial,NicknameIn addition to row-1 names and order, some sheets only have a few columns where others have an extensive list. For example;
sheet #2 ----- First_Name,Middle_Name,Nick_Name,Last_Name
sheet #3 ----- Name-Last,Name-First,Name-Middle,Name-Nick
four possible locations vs. only oneI've seen database import features that enabled mapping among table columns and spreadsheet columns. These were typically tedious manual activites.
multiple email accounts vs. only one.
I'm hoping that someone has an algorithm or other method so that I might program along the following lines:
- create per sheet data structure
- select one sheet as the master format for this pass
- read the data from one of the various CVS files
- re-arrange data from open file into the master format
- repeat for the remaining CSV files
- save the re-arranged data
~~~ 0;-Dan