Hi,
The category name is used in the export file as the id wouldn't mean anything for a system where you would import the CSV.
Now you can easily change that by editing the file "export" of the view "product" via the menu Display>Views and changing the line:
$categories[] = $this->categories[$category]->category_name;
to:
$categories[] = $this->categories[$category]->category_id;
But the mass actions system would be more appropriate for the example of modification you're describing.
If the mass action doesn't work like you want, it's probably that it is not configured properly. Could you do a screenshot of your mass action ?