Article 6CPCJ how to re-arrange spreadsheet (CSV) data

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:
sheet #1 ----- LastName,FirstName,Initial,Nickname
sheet #2 ----- First_Name,Middle_Name,Nick_Name,Last_Name
sheet #3 ----- Name-Last,Name-First,Name-Middle,Name-Nick
In addition to row-1 names and order, some sheets only have a few columns where others have an extensive list. For example;
four possible locations vs. only one
multiple email accounts vs. only one.
I've seen database import features that enabled mapping among table columns and spreadsheet columns. These were typically tedious manual activites.
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
Thank you in advance,
~~~ 0;-Dan
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments