Import Excel and upload the data only if excel values are changed


Hi All,

We are working on a application where we need to import the values and update it with existing data only if excel has new values or any existing values are changed.

If I Have 4 attributes in an entity and if I import the excel which also has same entities. Before overwriting th values in the entity, it should check if any new values are changed in excel and overwrite only those values. After this, it should return the number of values updated.

If there is no change in any values then it should written the same message.

 Solution I tired- I used upload file to import and excelToRecordList. When I try to upload and select proceed, I get exception saying no excel file is attached. 

Or

Can we export only those entries which were changed for that day only? 

Hi Ankita,

Can you share your code screenshot? and also proceed button must be of submit type action.

Regards,

Manish Jawla

Hi Manish,

I have attached the ss you asked for.Hope this helps.


but I want to knowif OR part is possible.ie Can we export only those entries which were changed for that day only? filtered by Date.

Ankita Kulkarni wrote:

Hi Manish,

I have attached the ss you asked for.Hope this helps.


but I want to knowif OR part is possible.ie Can we export only those entries which were changed for that day only? filtered by Date.

You need to write your own logic for checking the updated record i.e.store in some entity and compare from those stored values.


Ankita Kulkarni wrote:

Hi Manish,

I have attached the ss you asked for.Hope this helps.


but I want to knowif OR part is possible.ie Can we export only those entries which were changed for that day only? filtered by Date.


Hi AnKita,

You need to keep one column like created date & updated date, so that you can compare in your logic and then take the decision  whether you want to save it or ignore.

And one more thing regarding your code, instead of breaking the loop by end condition you should join it back to loop so that you can iterate rest of the value from the list.

Hope this helps.

Regards,

Manish Jawla