This would be fascinating to know, but there are reasons why we can't ever have such figures, and why those figures might be misleading anyhow.
First of all, the vast majority of sub-Saharan societies (or at least the people within them) were nonliterate. I say 'nonliterate' instead of 'illiterate' because they manifestly were not missing anything--powerful and efficient bureaucratized states, like the Asante Confederacy and the Edo Kingdom of Benin, operated entirely without writing; social order and cultural stability were not problems in cultures with latticed models of reinforcing oral transmission. So 'literacy' can be misleading to apply here in terms of thinking about a society being informed and engaged with various aspects of life.
This was also not something that anyone tracked--we don't even get population records for most areas away from the coastal trade castles. I'm not aware of any area other than colonized enclaves where this information could be available in the 1700s. Even there, I've never seen it--it's possible French Senegal or the Royal Niger Company's predecessors' records might have something for very localized areas, or maybe something in Angola or the Western Cape (South Africa), but that rate would be higher than (say) inland because of intercultural transfer and conversance. Again, I'm not sure what value the literacy rate would be, starting as we must from the premise that writing was not necessary for sociocultural, political, or economic sophistication among African societies. Aside from sacral symbolic languages like Nsibidi and religiously-spread ones like Ajami scripts (Arabic) for some Sahelian and Sudanic languages (including Kiswahili), or Arabic itself, you don't see so much of it--and those were almost entirely practices of the urbanized Islamic elite until quite late. We don't have reliable numbers there, either.
That said, some writers did in fact operate in other countries. For example, Olaudah Equiano, Ignatius Sancho, and Ottobah Cugoano (among others) produced writing for abolitionist causes. Enslaved people, like Toussaint L'Overture, were expert writers entrusted with correspondence and record-keeping in places like Sant-Dominque (Haiti) as well. So yes, there are a number of African writers who wrote in other countries, but there is (as far as I know) no complete accounting of them. Many, if not most, had been formerly enslaved people; some were in fact born into captivity after transportation and so the question of whether they 'count' for your purposes is an open one.
(If by '18th century' you accidentally meant the 1800s, that question might be a bit different, but only later in the century.)