Taken from this great site here: 7th Century A.D. - The earliest cookie-style cakes are thought to date back to 7th century Persia A.D. (now Iran), one of the first countries to cultivate sugar (luxurious cakes and pastries in large and small versions were well known in the Persian empire). According to historians, sugar originated either in the lowlands of Bengal or elsewhere in Southeast Asia. Sugar spread to Persia and then to the Eastern Mediterranean. With the Muslim invasion of Spain, then the Crusades and the developing spice trade, the cooking techniques and ingredients of Arabia spread into Northern Europe.
In 510 BC , hungry soldiers of the Emperor Darius were near the river Indus, when they discovered some “reeds which produce honey without bees.” Evidently this early contact with the Asian sources of sugar cane made no great impression, so it was left to be re-discovered in 327 BC by Alexander the Great, who spread it’s culture through Persia and introduced it in the Mediterranean. This was the beginning of one of the best documented products of the Middle Ages.