Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Larry Martell Newsgroups: comp.lang.python Subject: Re: Need help - How to identify the cell display format? Date: Tue, 15 Dec 2015 09:04:24 -0500 Lines: 25 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de oVBLyWzf77OJ749iUmdRHAjzHRFI8+F8G838BjPRpung== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'received:209.85.223': 0.03; 'value,': 0.03; 'used.': 0.05; 'subject:help': 0.07; 'subject:How': 0.09; 'example:': 0.10; 'folks,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; '2015': 0.20; 'to:name:python-list@python.org': 0.20; 'file.': 0.22; 'am,': 0.23; 'dec': 0.23; 'skip:l 40': 0.23; 'import': 0.24; 'skip:b 30': 0.24; 'header:In-Reply-To:1': 0.24; 'compare': 0.27; 'message-id:@mail.gmail.com': 0.27; 'actual': 0.28; 'notation': 0.29; 'excel': 0.29; 'print': 0.30; '15,': 0.30; 'skip:s 30': 0.31; 'tue,': 0.34; 'file': 0.34; 'received:google.com': 0.35; 'displays': 0.35; 'knowledge': 0.35; 'expected': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'being': 0.37; 'display': 0.37; 'received:209': 0.38; 'skip:o 20': 0.38; 'format': 0.39; 'subject:the': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'identify': 0.61; 'subject:Need': 0.61; 'about,': 0.84; 'excel.': 0.84; 'sheet': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=MKLp8DGZF9ZHk6hvBTlqmqGSB+m34BFG1cjhhOewYIE=; b=djDJqA8LNQ7dUQCBjuA1Mr1DpaPOrDEbb9x4G3dZPLSQIa9rzx+Dmz+LxBtaVECiMZ ncTiHE6eXWxGbnIInTRZdo8q1b3PIL6Bg/QrwmrBQQbl5HWV5Fbu5DMJVpTsruiuu9uT XkqEvKEVeqjyQMupKWpREAGRprd6B1LEgNVfErQaHtCLfiaCfZmq/qT5sQddvP9aClxd Y2JZbMf5Bb0OvFAPVDUrgWIe23Rk9pHf9QShO9eT/qA4rpE0XMaur/SkyRT1kBogb/Cb CP1dMtA1yPc1zpdbz9lXFrmKie08LcA5DEohUTS6pSYKV/+Hyz1T85cxM9sqKGKOnmi5 Yheg== X-Received: by 10.107.136.10 with SMTP id k10mr5743601iod.0.1450188303954; Tue, 15 Dec 2015 06:05:03 -0800 (PST) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:100456 On Tue, Dec 15, 2015 at 2:29 AM, Ezhilarasan Chandrasekar wrote: > Hi folks, > > I just want to find the cell display format in Excel. I have a Expected > excel file and Actual Excel file. > > I have some knowledge about, how to check the cell value, cell font, > alignment. But I also want to know about what type of cell format is being > used. > > For example: If the cell value has "*04:05:00 AM*", but it displays as " > *04:05:00*"(AM notation not needed) which is of format "*hh:mm:ss*" > > I want to identify the cell format *(hh:mm:ss)* from Expected Excel file > and compare with the Actual Excel file You can do this with openpyxl, for example: from openpyxl.reader.excel import load_workbook book = load_workbook(filename='transactions.xlsx') sheet = book.get_sheet_by_name('transactions') print sheet.cell("A12").style.number_format print sheet.cell("A13").style.number_format