Python Script to Export Data from Excel [closed] - python

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
so I want to write a python script that when executed will automatically pull certain columns from an excel sheet and automatically import them to something like word.
I am familiar with python, just really bad at it and I have a hard time visualizing how to start...
I'm not asking for a full script, just some examples to nudge me in the right direction and some tips going forward with my project.
Thanks for any help you are willing to offer. Have a great day!

Make yourself familiar with library called Pandas. With Pandas you can easily read columns from Excel spreadsheet to a dataframe. You can find Pandas function for that from here: Python Script to Export Data from Excel . Also, using .xlsx for this purpose is not optimal. You could use, for example, .csv format.
You can write Pandas dataframes to .docx file for example this way: Writing a Python Pandas DataFrame to Word document .

Related

convert excel model (input-calc-output) to another platform for gd [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 months ago.
Improve this question
I work in insurance as an actuary, and one thing we deal with is models, it usually involve bunch of input tables, then a calculation or projection process to produce certain output in interests.
It is usually more complex then usual excel reports you see in business world.
Now given the fast calc speed & effienciency in oher programming platform (C#, python, C++, Julia...etc)
I really want to use other platform to either
replicate the certain computational intensive process which usually takes 2-3 hrs as it go back and forth between bunch of excel sheets and doing an iterative process and find the solution
call or control the excel process
I understand python can control for part 2 using openpyxl , but for 1. which are the easiest to replicate with? here i meant easy to convert.
thanks many~
i am playing around python but did not expect can replicate the complex iteration process easily
This question will almost certainly get closed as StackOverflow does not allow asking for recommended software.
There's an active actuary group in Julia, their website is here:
https://juliaactuary.org/

Convert PDF to CSV or xlsx with python [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed last year.
Improve this question
I'm trying to convert the whole extension of a PDF into a CSV or an xlsx with python and I've hit a wall.
I know that there is an API called PDFTables that works perfectly but the number of documents that I would like to convert (over 400) and the fact that its use involves an economic investment that I can't afford makes its use unfeasible. There is another library that I've tried, tabula, however as far as I know it only works with the tables of the PDF.
With this problem in mind, are there any other options available?
Thank you in advance.
If you don't need it to be programmatic, have you seen https://www.adobe.com/la/acrobat/online/pdf-to-excel.html?

modify libreoffice writer document from python for auto reporting [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I would like to generate automated reports from my python program. I was using pdf reportlab solution before, but my needs are evolving. I need the possibility to comment / apply modifications in the report.
As a result, I was imagining to create an empty LibreOffice writer document (but with logos, first page,
etc. like a template), and from my program, I planned to copy this document, feed it from my python prog data, txt and pictures, and save it with a new name.
Like this, the report is closed to be complete and I can adjust it by myself at the end.
Do you know if it is possible to do that ?
Thanks for your help!
One of the solution I found is to use python docx library. It can open and save docx like document. It should work with writer docs

xsd parsing in python [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I have an xdr file and its format is described as an xsd. So I need to parse the xsd file first. Is there a python tool that will parse an xsd and give me the individual fields and their types.
An example of an xsd file I am trying to parse is here: http://mibs.cablelabs.com/namespaces/DOCSIS/3.0/xsd/ipdr/DOCSIS-SAMIS-TYPE-1/DOCSIS-SAMIS-TYPE-1_3.5.1-A.1.xsd
I think you might want to look at this guy, for starters:
https://pypi.org/project/xmlschema/
Never had occasion to use it myself before, but it looks powerful and awesome.
Note this feature:
Decoding of XML data into Python data and to JSON
As described in the example:
Using a schema you can also decode the XML documents to nested
dictionaries, with values that match to the data types declared by the
schema.
I think you might want to give that lib a whirl.
Now, as to the best way to get familiar with the schema, as I assume is your goal here, why not try generating a sample instance using an XML editor like oXygen, for example, and then using the above to see what all is in there?
You might also try:
https://pypi.org/project/generateDS/
Hope this helps!

Best Python Module for Reading Data from .xlsx [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm trying to read in data from .xlsx file and store the data in a list or preferably a dictionary in Python. I see there are many modules built for Python for interacting with .xlsx files like openpyxl, xlsxwriter, xlrd, xlwt, xlutiles, and they're all listed here: http://www.python-excel.org/. I would like to know which one is best for reading in data from the .xlsx and storing the data in a dictionary (preferably) or list?
I'm not trying to manipulate any data. i'm just reading the data in from .xlsx, and then writing it out to a csv file.
I'd go with pandas (which uses python-excel under the hood). See the documentation for more details.
If you plan to manipulate the data and run some calculations, DataFrame is a much better data structure than dict or list.

Categories