About 226,000 results
Open links in new tab
  1. Use Python to launch Excel file - Stack Overflow

    Mar 11, 2016 · BTW on Python 3.x (and possibly 2.x) you should use '/' as the file separator, never "\" - even on Windows. Python will do the conversion so you don't need to use double backslashes in paths (necessary to prevent the first character from being interpreted as a control character, e.g "\n" = line feed). –

  2. How to write to an Excel spreadsheet using Python?

    Python programs can easily read and write text, so a csv file is the easiest and fastest way to export data from your python program into excel (or another python program). Excel files are binary and require special libraries that know the file format, which is why you need an additional library for python, or a special program like Microsoft ...

  3. how to read certain columns from Excel using Pandas - Python

    I am reading from an Excel sheet and I want to read certain columns: column 0 because it is the row-index, and columns 22:37. Now here is what I do: import pandas as pd import numpy as np file_loc = "path.xlsx" df = pd.read_excel(file_loc, index_col=None, na_values=['NA'], parse_cols = 37) df= pd.concat([df[df.columns[0]], df[df.columns[22 ...

  4. Compare 2 excel files using Python - Stack Overflow

    May 9, 2016 · I have two xlsx files as follows: value1 value2 value3 0.456 3.456 0.4325436 6.24654 0.235435 6.376546 4.26545 4.264543 7.2564523 and value1 value2 value3 0.456 3.456 0.4325436 6.

  5. python - How to write to an existing excel file without overwriting ...

    2) Now It resize all columns based on cell content width AND all variables will be visible (SEE "resizeColumns") 3) You can handle NaN, if you want that NaN are displayed as NaN or as empty cells (SEE "na_rep") 4) Added "startcol", you can decide to start to write from specific column, oterwise will start from col = 0 ***** """ from openpyxl ...

  6. Update an Excel sheet in real time using Python

    May 18, 2018 · If you want to stream real time data into Excel from Python, you can use an RTD function. If you've ever used the Bloomberg add-in use for accessing real time market data in Excel then you'll be familiar with RTD functions. The easiest way to write an RTD function for Excel in Python is to use PyXLL.

  7. How to run Excel VBA / Macro from Python - Stack Overflow

    Sep 20, 2019 · Running Excel Macro from Python. To Run a Excel Marcro from python, You don't need almost nothing. Below a script that does the job. The advantage of Updating data from a macro inside Excel is that you immediatly see the result. You don't have to save or close the workbook first. I use this methode to update real-time stock quotes. It is fast ...

  8. python - Calculating Excel sheets without opening them (openpyxl …

    Well, the whole point of the question, as expressed in the subject line, is to NOT open the file with Excel. Suggestions to use Pycel or Koala are not "overkill"; they are necessary to satisfy the requirements. Not only is your solution Windows-specific, it requires Excel. There are folks who use Windows but do not have Excel.

  9. use python to generate graph in excel - Stack Overflow

    Apr 6, 2011 · If you are on windows, you can use pywin32 (included in ActivePython) library to automate Excel using OLE automation. from win32com.client import Dispatch ex = Dispatch("Excel.Application") # you can use the ex object to invoke Excel methods etc. If all you want to just generate basic plots etc. you can use matplotlib.

  10. Refresh Excel External Data with Python - Stack Overflow

    Dec 1, 2016 · I have an Excel file that I run a Python script on. The Excel file has external data connections that need to be refreshed before the Python script is run. The functionality I'm referring to is here: I'm using Python 2.7 and am relying on …

Refresh