Python path-process excel files with python,
Luo asked me how to read data from excel, and then I made a record.
The following code comes from: http://www.cnblogs.com/lhj588/archive/2012/01/06/2314181.html
Excel Data graph (Mr. Luo said that the data should be kept confidential to the customer, and I wrote several lines of data as needed ):
#! /Usr/bin/env python #-*-coding: UTF-8-*-# Read excel Data # Luo's requirements, take the data below the second row, import xlrddata = xlrd.open_workbook('test.xls ') # Open the xls file table = data. sheets () [0] # Open the first table nrows = table. nrows # obtain the number of rows in the table for I in range (nrows): # print row-by-row loop if I = 0: # skip the first row continue print table. row_values (I) [: 13] # retrieve the first 13 Columns
When excel write operations are later used, record them