Evaluate an Excel Spreadsheet in Python ( Headless Excel engine?)












0















So we have a manufacturing process that involves a fairly complex excel spread sheet (Actually several spread sheets) as part of the process.



Because the spread sheet is as complex as it is and it is still a living document I am not comfortable trying to translate it into python.



Instead I would like to evaluate the spread sheet inside of a python shell.



I.E. I will create a python / tkinter user interface to allow various paramaters to be entered. Once ready I would load these parameters into there correct cells in the various spread sheets, evaluate the spread sheets, and extract the information that I need.



openpyxl will let me manipulate the cells but it is not clear to me that it will evaluate the spread sheet. ( There are a total of 3 spread sheets that are linked).



The spread sheets have macros and some VB code behind the cells. So it would be quite a project to capture all of this in python. As I noted above, this is also a living spread sheet. As the process is tuned the spread sheet is updated.



I want to stay away from any scenario where I have two systems that must be kept in sync (i.e. the spreadsheet and python code that could get out of sync).



Any pointers would be greatly appreciated.
LibreOffice appears to have a --headless option. I will look into that further.










share|improve this question


















  • 1





    What is your question? Please be specific else this will be closed as too broad. If it's about programming then it's off-topic.

    – DavidPostill
    Jan 3 at 15:20











  • to get a specific answer, you will need to ask a specific question, as it stands this question will likely get closed, see more here: superuser.com/help/how-to-ask

    – PeterH
    Jan 3 at 15:20











  • I use powershell and the COM library for my xlsx stuff. But saving and loading said sheet should force recalculation. But the biggest danger would be users messing up said living spreadsheet.

    – Brian
    Jan 3 at 20:33


















0















So we have a manufacturing process that involves a fairly complex excel spread sheet (Actually several spread sheets) as part of the process.



Because the spread sheet is as complex as it is and it is still a living document I am not comfortable trying to translate it into python.



Instead I would like to evaluate the spread sheet inside of a python shell.



I.E. I will create a python / tkinter user interface to allow various paramaters to be entered. Once ready I would load these parameters into there correct cells in the various spread sheets, evaluate the spread sheets, and extract the information that I need.



openpyxl will let me manipulate the cells but it is not clear to me that it will evaluate the spread sheet. ( There are a total of 3 spread sheets that are linked).



The spread sheets have macros and some VB code behind the cells. So it would be quite a project to capture all of this in python. As I noted above, this is also a living spread sheet. As the process is tuned the spread sheet is updated.



I want to stay away from any scenario where I have two systems that must be kept in sync (i.e. the spreadsheet and python code that could get out of sync).



Any pointers would be greatly appreciated.
LibreOffice appears to have a --headless option. I will look into that further.










share|improve this question


















  • 1





    What is your question? Please be specific else this will be closed as too broad. If it's about programming then it's off-topic.

    – DavidPostill
    Jan 3 at 15:20











  • to get a specific answer, you will need to ask a specific question, as it stands this question will likely get closed, see more here: superuser.com/help/how-to-ask

    – PeterH
    Jan 3 at 15:20











  • I use powershell and the COM library for my xlsx stuff. But saving and loading said sheet should force recalculation. But the biggest danger would be users messing up said living spreadsheet.

    – Brian
    Jan 3 at 20:33
















0












0








0








So we have a manufacturing process that involves a fairly complex excel spread sheet (Actually several spread sheets) as part of the process.



Because the spread sheet is as complex as it is and it is still a living document I am not comfortable trying to translate it into python.



Instead I would like to evaluate the spread sheet inside of a python shell.



I.E. I will create a python / tkinter user interface to allow various paramaters to be entered. Once ready I would load these parameters into there correct cells in the various spread sheets, evaluate the spread sheets, and extract the information that I need.



openpyxl will let me manipulate the cells but it is not clear to me that it will evaluate the spread sheet. ( There are a total of 3 spread sheets that are linked).



The spread sheets have macros and some VB code behind the cells. So it would be quite a project to capture all of this in python. As I noted above, this is also a living spread sheet. As the process is tuned the spread sheet is updated.



I want to stay away from any scenario where I have two systems that must be kept in sync (i.e. the spreadsheet and python code that could get out of sync).



Any pointers would be greatly appreciated.
LibreOffice appears to have a --headless option. I will look into that further.










share|improve this question














So we have a manufacturing process that involves a fairly complex excel spread sheet (Actually several spread sheets) as part of the process.



Because the spread sheet is as complex as it is and it is still a living document I am not comfortable trying to translate it into python.



Instead I would like to evaluate the spread sheet inside of a python shell.



I.E. I will create a python / tkinter user interface to allow various paramaters to be entered. Once ready I would load these parameters into there correct cells in the various spread sheets, evaluate the spread sheets, and extract the information that I need.



openpyxl will let me manipulate the cells but it is not clear to me that it will evaluate the spread sheet. ( There are a total of 3 spread sheets that are linked).



The spread sheets have macros and some VB code behind the cells. So it would be quite a project to capture all of this in python. As I noted above, this is also a living spread sheet. As the process is tuned the spread sheet is updated.



I want to stay away from any scenario where I have two systems that must be kept in sync (i.e. the spreadsheet and python code that could get out of sync).



Any pointers would be greatly appreciated.
LibreOffice appears to have a --headless option. I will look into that further.







microsoft-excel worksheet-function python






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 3 at 15:16









user980548user980548

1




1








  • 1





    What is your question? Please be specific else this will be closed as too broad. If it's about programming then it's off-topic.

    – DavidPostill
    Jan 3 at 15:20











  • to get a specific answer, you will need to ask a specific question, as it stands this question will likely get closed, see more here: superuser.com/help/how-to-ask

    – PeterH
    Jan 3 at 15:20











  • I use powershell and the COM library for my xlsx stuff. But saving and loading said sheet should force recalculation. But the biggest danger would be users messing up said living spreadsheet.

    – Brian
    Jan 3 at 20:33
















  • 1





    What is your question? Please be specific else this will be closed as too broad. If it's about programming then it's off-topic.

    – DavidPostill
    Jan 3 at 15:20











  • to get a specific answer, you will need to ask a specific question, as it stands this question will likely get closed, see more here: superuser.com/help/how-to-ask

    – PeterH
    Jan 3 at 15:20











  • I use powershell and the COM library for my xlsx stuff. But saving and loading said sheet should force recalculation. But the biggest danger would be users messing up said living spreadsheet.

    – Brian
    Jan 3 at 20:33










1




1





What is your question? Please be specific else this will be closed as too broad. If it's about programming then it's off-topic.

– DavidPostill
Jan 3 at 15:20





What is your question? Please be specific else this will be closed as too broad. If it's about programming then it's off-topic.

– DavidPostill
Jan 3 at 15:20













to get a specific answer, you will need to ask a specific question, as it stands this question will likely get closed, see more here: superuser.com/help/how-to-ask

– PeterH
Jan 3 at 15:20





to get a specific answer, you will need to ask a specific question, as it stands this question will likely get closed, see more here: superuser.com/help/how-to-ask

– PeterH
Jan 3 at 15:20













I use powershell and the COM library for my xlsx stuff. But saving and loading said sheet should force recalculation. But the biggest danger would be users messing up said living spreadsheet.

– Brian
Jan 3 at 20:33







I use powershell and the COM library for my xlsx stuff. But saving and loading said sheet should force recalculation. But the biggest danger would be users messing up said living spreadsheet.

– Brian
Jan 3 at 20:33












0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1390202%2fevaluate-an-excel-spreadsheet-in-python-headless-excel-engine%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1390202%2fevaluate-an-excel-spreadsheet-in-python-headless-excel-engine%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown