Convert Excel code to Python

51 views
Skip to first unread message

BIJAL MANIAR

unread,
Jan 9, 2018, 8:15:55 AM1/9/18
to Django users

Hi,

There is an old application in Excel where macros are coded in VBScript and there is both frontend (forms) and backend in Excel. Need to replicate it as a web application (Python, Django, React). From scratch, have to build it in python.
I have checked vb2py library is there for code conversion but it has limitations. Can anyone please guide me if any tools are available to convert code from vbscript to python? 

Thanks,
Bijal

Jason

unread,
Jan 9, 2018, 8:50:40 AM1/9/18
to Django users
Are you able to write the code yourself?  Might be better that way.

RM T

unread,
Jan 9, 2018, 7:30:06 PM1/9/18
to Django users

Use third-party libraries
在 2018年1月9日星期二 UTC+8下午9:15:55,BIJAL MANIAR写道:

John Fabiani

unread,
Jan 9, 2018, 8:11:26 PM1/9/18
to django...@googlegroups.com
There are several libs available that deal with excel.  I normally just use xlwt.  But, if memory serves, xlwing does something with vba.

I've never used xlwing so I might completely wrong.  Either way check out all the python libs for excel.
Johnf

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/14166316-e249-4150-ba79-015ff1308194%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

BIJAL MANIAR

unread,
Jan 10, 2018, 12:53:34 AM1/10/18
to Django users

Hi,
Thanks all for reply.
Since it is an old application there is no documentation for it. I will have to do Reverse Engineering by looking at vbscript code and gathering requirements.
Total there are 40 screens. A single form has 20-30 input parameters to select from and generate output depending on that. There are validation for combination of few input parameters as well. I can code in python but want some suggestion on approach to be followed.

I know fully automated tools are not available. Has anyone used vb2py or any such libraries for such requirement and how accurate it was?

Thanks,
Bijal

johnf

unread,
Jan 10, 2018, 9:02:36 AM1/10/18
to django...@googlegroups.com

I did not realize that the old app was so large.  I think I would take a different approach to the problem and not the one you are suggesting - to convert the VBA to python.  Django and excel are very different animals.  In my opinion you are trying to mix apples and oranges and that never works well.  I would review each form and determine the data requirements and come up with a database schema.  You might then consider using a REST interface for the data - including functions requirements.  Then review the UI and determine if the there is a better way to present the data (or gather the data).  I would not make any attempt to recreate the UI but follow the requirements and create a UI that meets the requirements.  IMO this is a completely new project.    All the excel does for you is provide a guide - nothing like a solution.  Attempting to use some sort of converted VBA code will only cause you to have a bad Django project.

Johnf

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
Reply all
Reply to author
Forward
0 new messages