Hi - thanks for your hard work on this project. What we have is a chart of community organizations: each row is a community group (col1 = group name); each column is "area of interest" (row1 = interest name). See the attached csv (extension changed to .txt to allow upload). The cells themselves are just a yes or no (x or blank currently) indicating that "yes, this community group is interested in the topic belonging to this column."
So, is it possible / would it be possible to look for a certain cell value, and when that value is found, set the newly created node's corresponding field value to be equal to the title of the csv column, rather than the value of the cell itself? For instance, importing the attached csv directly results in the value "x" being added in the designated field of the new node.
Of course, this could be handled by some pre-processing of the csv, to actually search-and-replace the "x" with the column's title, using perl or whatever tool of choice. But, this might be an exciting feature to add to the module.
Further, we'd also like to break it down by primary, secondary, tertiary etc areas of interest. We'd want to map the "primary" selection to one field of the node (call it primary_interest), then secondary csv selection to secondary_interest, etc. So that gets even a little bit further in: analyze the contents of each cell to see how to handle them:
if cell content is ...
...then do this...
"1" -> set the node's primary_interest field equal to this cell's column label (row 1 value)
"2" -> set the node's secondary_interest field equal to this cell's column label (row 1 value)
"3" -> ..... tertiary_interest
"4" -> ...
"x" -> append this cell's column label to the other_interests node field
Thanks in advance - this is a great module! Would hate to add all these nodes by hand without the module! Our complete spreadsheet is about 300 rows by about 200 columns, so even if preprocessing here is required it's still a huge help.
-Tom
| Comment | File | Size | Author |
|---|---|---|---|
| groups.txt | 163 bytes | caver456 |
Comments
Comment #1
alex commentedI would think a better and faster way is editing your csv file to the needed format.
"Group","Food","Transportation","Energy","Other"
"group1","Food",,,
"group2",,"Transportation",,"Other"
"group3",,,"Other",
"group4","Transportation","Energy",,
"group5","Food",,"Energy","Other"
"group6","Food","Transportation","Energy",
With the right tools and skills, it can be done in couple minutes, even if it has thousands of rows.
Thanks,
alex
Hills Web