Tag: python

Import excel file in python and identify cells of which the content is strikethrough

I want to read in many Excel documents and I would like to receive at least one important bit of information on the format. However, I am afraid that there is no tool for it, so my hope is on you! Each excel file that I am reading in contains a few cells that of […]

Python: Reading CSV for keys and assigning value as a new column

I’m new to Python, please be patient if I couldn’t explain my scenario well. I want to search each record in the CSV file for some defined keywords and enter the relevant value in the last column of the same CSV file. This keys and values structure can be defined as a dictionary. For example, […]

python merge multiple excel files with multiple spreadsheets

i want to merge the sheet form different excel files together, so i can do sum up with sheet1, sheet2 ect.. but now i can only put the sheets in one workbook separately…any helps? Thanks advance. here’s my script: import pandas as pd import glob import os path_read =r’D:\merge’ list_dfs = [] data = pd.DataFrame() […]

Serving excel file via django

Hello I have seen many similar posts like this but I am not able to solve my problem. So from client side i am uploading a excel file (.xls) and then in django view i am performing some task and then want to return the same excel file with some errors written at the end […]

Python File using Crontab to send data on an Excel File, needs Excel formatting

I have a simple Python file which runs a couple commands which create three columns. I then use crontab to send this data to an email address weekly as an excel sheet. Everything works perfectly except when I look at the Excel sheet. The data on the three columns do not line up correctly. My […]

Using Python COM objects from Excel VBA

I am trying to create python classes to be used in Excel, taking references from Python: Programming on Win32. Currently: Python script (win32comLibrary.py) class PythonUtilities: _public_methods_ = [ “SplitString” ] _reg_progid_ = “PythonDemos.Utilities” _reg_clsid_ = “{AF272547-D5BC-4452-852E-3F8746672097}” def SplitString(self, val, item = None): import string if item!=None: item = str(item) return string.split(str(val), item) if __name__== “__main__”: […]

Encoding an EPPlus Excel file's byte array as a string in order to email it as an attachment using Postmark API

I’m using EPPlus to create an Excel file with a couple of sheets and some data inside of it. I can convert it to a byte array using the ExcelPackage class’s GetAsByteArray() method. I can also use the ExcelPackage constructor to make an excel file from a byte array like this: var memoryStream = new […]

loading an excel workbook in my local system works but same not working in my amazon aws(clound instance))

I am trying to work on manipulating excel sheets in python with openpyxl module I am trying to load excel work book in my local system Python 2.7.12 (default, Jul 1 2016, 15:12:24) [GCC 5.4.0 20160609] on linux2 Type “help”, “copyright”, “credits” or “license” for more information. >>> import openpyxl >>> >>> wb = openpyxl.load_workbook(‘GCD_FINAL_OUTPUT.xlsx’) […]

Cannot read Excel chart properly with intended line of code

So this might be a simple solution but I can’t seem to come up with it. When I use the following code I can open the file, read through it and do all the necessary functions, but if I use the commented line instead of the one underneath it gives me an error at line […]

Python Win32 Turn off Excel Calculation

I get an excel version using the following python code; import win32com.client as win32 xl = win32.DispatchEx(‘Excel.Applcation’) I then want to turn off calculations, I thought this code would be the following but it’s not? xl.Calculation = ‘-4135’ #-4135 is the enum value for xlManual In addition does anyone know what else I could turn […]

MS Excel Spreadsheet is the best Office Software, Excel VBA and Excel Formulas make Spreadsheet work faster.