You need to cut away the rusted material.
This will need to be replaced and it must be welded into place - pop rivets and screws are not sufficient. The repair should provide the same structural strength as the original.
Replacement sills either complete or sections are available. If not a good shop will make suitable sections as needed.
Any asking of ...
The 319d engine is simply a 320d but detuned. As far as I know there is a difference in the fuel injectors and the ECU mapping.
319d fuel injector are Bosch #0445110209 while 320d/323d are #0437502006.
ECU might work, but will probably have to be reprogrammed or replaced with a 318d ECU.