We're sorry GroupDocsCloud doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.cloud

How to Convert Excel to Word Document in Python

Hi @tilal.ahmad hope you are doing well. Getting back to you on this one. Is there any possibility to convert the excel to word using GroupDocs. If GroupDocs provides such functionality can you please help me out with an example or sample code where I can upload my excel sheet and get it converted to word and at the same time download it to my desktop . I need it for my internal project use.
Thanks in advance

@Gitika_Srivastava

Yes, you can convert Excel to Word document using GroupDocs.Conversion Cloud API. Please also check the documentation for the supported file formats list.

# Import module
import groupdocs_conversion_cloud
from shutil import copyfile

# Get your client_id and client_key at https://dashboard.groupdocs.cloud (free registration is required).
client_id = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx"
client_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxx"

# Create instance of the API
convert_api = groupdocs_conversion_cloud.ConvertApi.from_keys(client_id, client_key)

try:

        #Convert Excel to DOCX
        # Prepare request
        request = groupdocs_conversion_cloud.ConvertDocumentDirectRequest("docx", "Book1.xlsx")

        # Convert
        result = convert_api.convert_document_direct(request)       
        copyfile(result, 'output.docx')
        print("Result {}".format(result))
        
except groupdocs_conversion_cloud.ApiException as e:
        print("Exception when calling get_supported_conversion_types: {0}".format(e.message))