any-way-to-increase-the-accuracy-of-the-import-column-header-mapping

Questionsany-way-to-increase-the-accuracy-of-the-import-column-header-mapping
Tony Wolsey asked 4 years ago

Hello

When importing a CSV file, there seems to be trouble recognizing some field column header names. A window is shown to ensure fields headings in CSV match DB field names and offer a chance to re-map accordingly but if the names match in CSV and DB, why do we need to map the values?  Why can’t the fields map accurately?

thanks

Tony

1 Answers
Abu Ghufran Staff answered 4 years ago

Currently it checks atleast 80% similarity to map similar fields in import. To match fields we use similar_text

similar_text(strtolower($d),strtolower($r[“field_name”]),$percent);
if ($percent > 80)
{
// map
}

Code can be modified in lib/inc/import/step2.php

If you tell me your test case data (imported headings & database fields), i will verify further. So far 80% similarity works good for most cases.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

8 + 2 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?