Excel import and truncate last record

QuestionsExcel import and truncate last record
Hafiz asked 6 years ago

Hello Abu,

Is it possible if I want to Import excel file? When I click button submit import, the process will need to truncate the table first before adding new data. If it possible,may I know how to do it?

Note : This page is the only one that using import function.

4 Answers
Abu Ghufran Staff answered 6 years ago

We support all delimeter separated files. You may need to convert excel to tsv,csv and then import OR you can copy paste data from excel to open textarea. Please refer this screencast for excel: https://www.phpgrid.org/import-excel-sheet-google-sheet-csv/

By default new rows are appended. If you want to show append or replace option on Step2, you can set:$opt[“import”][“allowreplace”] = true;
$g->set_options($opt);

From docs: http://www.phpgrid.org/docs/importing-data/

 

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Hafiz answered 6 years ago

I tried to implement this but come out with this problem.

Nothing imported. Please recheck the data and try again.

 

Abu Ghufran Staff answered 6 years ago

I can’t tell exactly what could be wrong.
You can email me screencast after recording (using jing.com or other) and file you are trying to import.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Hafiz answered 6 years ago

Hello Abu,

I have sent you the email with my codes.

Please help.

Your Answer

17 + 6 =

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?