Zoltan
Activity ID(task_code) cannot be updated directly by using the excel update function, as it is the unique identifier that P6 uses to recognize where to update everything else.
Think about it! How P6 will be able to understand which activity updated?
Of coarse there is a Task_ID identifier which is never imports or exports in a conventional excel options. You can use it and change Activity ID (task_code) if you know how to use SDK, API or even directly manipulate XER or XML file (XERparserbuilder) but these methods are not for the faint of heart. On top of that in lots of organizations you will not grant access to SDK, API or even able to import and export schedule XER files freely.
But there is a very easy workaround.
1- Add a TEXT user defined field.
2-Export excel with the userdefined field and other required fields.
3- Enter your new activity ID's in the user defined field.
4- Import excel file to P6.
5- Run a global change to copy user defined field data to the Activity ID
couple of points:
1- make sure the activity ids are unique by using excel conditional formatting or remove duplicate function.
2- if you are rearranging Activity ID's you might receive the global change error. In that case i would suggest adding something at the begining of all of the activity ID's and after completing the Activity ID changes go back and use replace function to remove that part.