That's easier then what I did. Using <a href="http://code.google.com/p/parsecsv-for-php/">http://code.google.com/p/parsecsv-for-php/</a><br><br>Example code:<br>function opcerts_import_person() {<br> //add person<br>
$csv = new parseCSV;<br> $csv->auto('/var/www/import.csv');<br> <br> foreach ($csv->data as $key => $row) {<br> //get the nid if the person already exists<br> $nid = opcerts_person_check_emp_id($row['emp_id']);<br>
if (!$nid) {<br> $person = new stdClass;<br><br> //add person<br> $person->uid = 1;<br> $person->type = 'person';<br> $person->field_last_name[0]['value'] = $row['l_name'];<br>
$person->field_first_name[0]['value'] = $row['f_name'];<br> $person->field_emp_id[0]['value'] = $row['emp_id'];<br> $person->field_position[0]['value'] = $row['title_tid'];<br>
$person->field_unit[0]['value'] = $row['unit_tid'];<br> $person->field_middle[0]['value'] = $row['m_name'];<br> $person->field_other_name[0]['value'] = $row['o_name'];<br>
}<br> else {<br> //add the unit to the person<br> $person = node_load($nid);<br> array_unshift($person->field_unit, array('value' => $row['unit_tid']));<br> }<br> node_object_prepare($person);<br>
node_save($person);<br> unset($person);<br> }<br>}<br><br>Cheers,<br>Neil<br><a href="http://code-dreamers.com">http://code-dreamers.com</a><br><br><div class="gmail_quote">On Thu, Jul 30, 2009 at 1:19 PM, Kyle Mathews <span dir="ltr"><<a href="mailto:mathews.kyle@gmail.com">mathews.kyle@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Feedapi + parser_csv + feed element mapper + cck<br><br><a href="http://drupal.org/project/feedapi" target="_blank">http://drupal.org/project/feedapi</a><br>
<a href="http://drupal.org/project/parser_csv" target="_blank">http://drupal.org/project/parser_csv</a><br>
<a href="http://drupal.org/project/feedapi_mapper" target="_blank">http://drupal.org/project/feedapi_mapper</a><br><br>Kyle<br><br clear="all">Research Assistant<br>Entrepreneurship and Technology Center @ BYU<br><a href="http://kyle.mathews2000.com/blog" target="_blank">kyle.mathews2000.com/blog</a><br>
<br><br><div class="gmail_quote">2009/7/30 Gastón Pablo Pérez <span dir="ltr"><<a href="mailto:gpperez@gmail.com" target="_blank">gpperez@gmail.com</a>></span><div><div></div><div class="h5"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi!<br><br>I would like implement a functionality in a web site for able to upload an excel file, with a determined format, and then, I want to generate nodes with this information.<br>Exists a module or a medium to do that? or how can i insert data into drupal database from an excel file?<br>
<br>thanks a lot<br><font color="#888888"><br>-- <br>"La perseverancia es un árbol de raíces amargas, pero de frutos muy dulces."<br><br>Gastón Pablo Perez<br><a href="mailto:Email%3Agpperez@gmail.com" target="_blank">Email:gpperez@gmail.com</a><br>
</font></blockquote></div></div></div><br>
</blockquote></div><br>