Skip to content

Instantly share code, notes, and snippets.

@lanfon72
Created August 4, 2017 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lanfon72/5595ae46cefd98b68e6c9007cf38fb7c to your computer and use it in GitHub Desktop.
Save lanfon72/5595ae46cefd98b68e6c9007cf38fb7c to your computer and use it in GitHub Desktop.
open and save xls file.
import os
from win32com.client import Dispatch
def calc_formula(fname):
xls = Dispatch("Excel.Application")
return xls.Workbooks.Open(os.path.abspath(fname)).Close(True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment