Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Python web app

Options
  • 22-06-2021 7:35pm
    #1
    Registered Users Posts: 247 ✭✭


    Hey,
    I want to write a simple python web app that will transfer some data from an excel sheet into various places in a Word document.

    Should I use a framework such as Django or should I even use Python!


Comments

  • Registered Users Posts: 7,703 ✭✭✭StupidLikeAFox


    Are you just doing it for yourself or want to build something for public consumption? If its just for yourself then you can use mail merge functionality in word


  • Registered Users Posts: 247 ✭✭bridest


    Are you just doing it for yourself or want to build something for public consumption? If its just for yourself then you can use mail merge functionality in word

    It's to automate a process at work, and mailmerge can't do it


  • Registered Users Posts: 6,236 ✭✭✭Idleater


    bridest wrote: »
    It's to automate a process at work, and mailmerge can't do it

    Why a web app if you are reading one file and writing another?

    A simple command line script would solve that particular problem.


  • Registered Users Posts: 247 ✭✭bridest


    because it's not always the same two files being read and wrote to and also we need to create a folder structure


  • Registered Users Posts: 4,275 ✭✭✭km991148


    Without further requirements it still sounds something a bit script-y.

    You can still use python if you like, but a web app sounds a bit much..


  • Advertisement
  • Registered Users Posts: 4,275 ✭✭✭km991148


    bridest wrote: »
    because it's not always the same two files being read and wrote to and also we need to create a folder structure

    I mean you can still pick up the file using a known folder structure or based on extension etc and create the new structure on the script.

    If you Google the chances are you'll find a solution that covers most if what you would want in whatever language (bash script, powershell, python, whatever).

    Tell us what you need and people can probably help.

    However if you really want to create a fully blown web app then go for it, but it's sounds overkill so far.


  • Registered Users Posts: 7,703 ✭✭✭StupidLikeAFox


    Does your company use office 365 with sharepoint - microsofts power automate is designed for this kind of thing


  • Registered Users Posts: 247 ✭✭bridest


    Does your company use office 365 with sharepoint - microsofts power automate is designed for this kind of thing

    No we don't use it


  • Registered Users Posts: 4,386 ✭✭✭EKRIUQ


    bridest wrote: »
    Hey,
    I want to write a simple python web app that will transfer some data from an excel sheet into various places in a Word document.

    Should I use a framework such as Django or should I even use Python!

    Just use

    import CSV in python to grab the content you need

    Then write it to the file where you need it using regex expressions or if you look at python-docx it might have a solution.

    Setting up a Django environment seems a bit over the top unless your going to be handing it over to someone else.


  • Registered Users Posts: 247 ✭✭bridest


    EKRIUQ wrote: »
    Just use

    import CSV in python to grab the content you need

    Then write it to the file where you need it using regex expressions or if you look at python-docx it might have a solution.

    Setting up a Django environment seems a bit over the top unless your going to be handing it over to someone else.

    It's not just for me, it's for all employees. Some not very computer literate so has to be easy to use


  • Advertisement
  • Registered Users Posts: 69 ✭✭Daawaa


    I think this would be a great little project to create using python and Django.

    As it will be for all employees you can host it internally on your organisations server. I have built multiple similar type apps - to automate manual processes - using python/Django.

    If you are new to python/django, this could be a good side project. Django documentation is good and a lot of django support online (stack overflow etc.)



  • Registered Users Posts: 11,986 ✭✭✭✭Flinty997


    The best solution is VBA it's exactly what it was designed to do. But I realize no one wants to touch that.



  • Registered Users Posts: 11,986 ✭✭✭✭Flinty997


    Curious if there's update on this?



  • Registered Users Posts: 7,703 ✭✭✭StupidLikeAFox


    Since I made this post something very similar came up in work and power Automate worked great. I have it monitoring a folder, then depending on the filename it sends the file as an attachment to a specific email address and transfers the file to a sub folder. All very easy to do with no coding required


    This should help you most of the way OP if you decide to go down that route:

    https://tahoeninjas.blog/2020/03/13/generate-word-documents-from-a-template-using-power-automate/



  • Registered Users Posts: 247 ✭✭bridest


    Thanks, I'll look into it. Would it work from an excel file?



Advertisement