Start with group loop node, which will group your data by “City code” and send this data forward where you can write this to excel with Excel sheet appender. For the sheet name you can use variable.
I do not know the structure of your data but look at this workflow KNIME_project.knwf (1.1 KB) as an example and upgrade it for your needs.
The sheet name is controled by the variable.