Yes zaheerbabar, you can export from QuickBooks Enterprise 18 to QuickBooks Online.
Before you start, please check the targets of your company file, and make sure it doesn't exceed 350,000. You can press F2 or Ctrl+1 while QuickBooks is open, and check the Total Targets in the File Information section. If it exceeds, you can condense your file to successfully export your data. Please be sure to back up your file before condensing it.
Here's your reference article when converting your file: Convert QuickBooks Desktop file to QuickBooks Online.
On the other hand, there are things that are will not go with the conversion due to the difference in the platform. You can check them in this article: What Data Doesn't Convert from QuickBooks Desktop to QuickBooks Online?
Please let us know if you have other questions.