python-xlrd 实现excel 导入数据
首先安装 xlrd 两种方式:
1.wheel 方式 安装:
首先要下载 wheel :
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqwAAADMCAIAAAA5y2YUAAAa+klEQVR4nO2cz64dN3KH+83yNgL8SNl5rQcYYLw6qwQDDAJ4FllMvFMGMgTYkRwL493N4uJ2KLKqWEWyu9mH34eG0Yfnx/pHNrskX93t5Y1t215eXv7r4+/p9ecfP33//ffffffdBgAAAKfzxx9/fPjw4ePHj7/88sv/JHz+/Pn1vztfvnz57bffPn369OHDh5eXlz//+Cl7p//Lf/y2bdtLwkYTAAAAMC2nNgE//fx7etEEAAAAXEhPE5C902kCAAAA7gRNAAAAwKKc3AR8/ennrz/9/PvrDU0AAADAhfQ1AV/Tix8MBAAAuBOn/mDgf/73/6YXTQAAAMCF9DQB2Tu93gT8299/3a9///uvNAEAAAAX0tMEZO/0ehPww4+f/vWvGxcXFxcXF9ftrqwJ+OHHTz/87f8vmgAuLi4uLq6nvWgCuLi4uLi4Fr1GNgE//O0TPxMAAABwIZ6fCaAJAAAAeEJoAgAAABaFJgAAAGBRaAIAAAAWhSYAAABgUWgCAAAAFoUmAAAAYFEmagIeCW3JpHN77IzFiCSabzSpeYoQ5dDIO7dZ1Av7ucHUEP0t6E/q8S1jwgr6ncHFo+CgqE5mVF7a9FmagOh5JwouPDSrx6It8HsJJRU17rd8jp0hpqpb5QjYz04vi+zn5nr67b9a8JuKVt72eyilF088Jz8yQxiYl//cm6IJyCITP5aboEzmwh3QHM8kO3VUGGPTGXg4Drfsd8p+Pp/Z9vPR6xs1FXV37XI7n5ft0kdmCKPyCq3XjE2AGLf9CFUr9UgQjYtiv52eeDKNHVLVSE++WjzOOjTHL1bPqKFmSpMZ+oa8yiCNmLVvS0E5KCZlxFmN32+nJ55HsX+MkKpGevLV4nHWoTn+avXsemZGquNVU515afFrg4ad6HjUdbVcznzFKVE7jwJPvv68qvlqfrOJN2gCDLQMO+/Fgtr6sfGU7kL2G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TwKeqIFgKdneBPw14Tt8+dfX69tyd8YqJ3ssHNJWVgXAIBXhjcB+3v/8+dfV28CtnF/gnxKLiwO6wIAsNEEAAAALAtNAAAAwKLQBAAAACwKTQAAAMCi0AQAAAAsyixNwI1+WjsUZ/TfefeE1G8n6nFUXp2lGF7JtvX1TBlVt6hfAACRKZqA9CCb/FDbwwvFqYnHvrr6jYzy2xBPZwpjt03oje6fpe3z6P6P+gUA0KAJiNEW3tFNQD+X53X3JuDxRkhv34/yCwCgMV0TkGIcjo+EcsrR4/44jUFxvO19YBTHk9ejwNY352WPO5MVP+73zvjb8tJk/hTs4J2ue/wCAKRM0QRs5i+on+2+DLV6iGvHtD9lG2c8hvGqr568GuLxxCAuTTre7Fd0lJE5cqagOS2Ne6ZH/QIAZMzSBLxSPeVFmTY9GxcP2TZTxmBVYI970qzaMYx0li40SzMixuZJdtc8ipefeG/7bchLlGXunLOiX/X7BQAomaIJ8LwYPC+M6HjDxOo7I/RSse37D/dM2RDPoXl5ZJ5kd82jePmJ9/6yRwWprC2Fk/0CAIjcvgk48778WNUbg7Y4dLIbQUbzcupDeTXEoyHGqZlq9hsNxvjoqYPt1LbjjxYAoOTQJuD/AHHo2sXcJNWDAAAAAElFTkSuQmCC" alt="" />
然后下载 xlrd 的 wheel压缩包 :链接:http://pan.baidu.com/s/1gf1BNij 密码:8gz4
下载后放在 放在 一个目录下 F:/
执行
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAApMAAACICAIAAAA0+vfbAAASLklEQVR4nO2dPY7kRhKFeV3dQpfQAvJk6gori54cOdoryBAgQFh3vF5joFoOMyLyRf6QzK7vw0BgZUW+eBFkZUzP9LS2j4+Pj4+Pbds+Pj5++f2vX/7z/1///v2vn3766bvvvvv+++31q5lS4fjymOK1HuQtw5TUplq82B+vWPICzHhRXNfJxldTn+5LoG96KKXKMPPh8cpp7l68CAAwmy9fvvz6668///zzD//64fVrUyb33c4/IfEkeLc58W71AgCIfPny5Y8//vjzzz///vvv//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Fek3vIrucUe3tdT57c+4GsprIxGw8AMAp7cv/42/bjb9smT+4jwUT3DtNr1nWfwaK5XpUyFYLmKHXtBXF8c13xulhsNUspHryl5PXSVSPFFNl4AIBRtE/uLfzh2E+7Lq168WZAvF6VMhH9BOLVXD11Nfip2hD9nOLLveX1iWqxsUllYzYeAGAUXZP7Kw0n/pF4PXUcp9ar3nQ1pcyqTiDS2brULk/E9JYtNtXP/duJOKTJisMy3ZB4AIBRjP977uwpn11v2GhGVr216TcPlQY/U+tSwrLFTr1fQd4Gh9WN2XgAgFHcM7mvvC5fVuODxTg4dXwHJrN1ifGpuhr8eJg+Az9t9ytOba579Xov9XgAgHlM+ffcx8XywA3iZ6x7waJPZf0kuNUwdcpE2RKG1+Xl9fSDYs2XQR+qxYp5lRK8LT3xAADz4GeoDYPjGwAALoDJ3QtfdQEAwJUwuQEAAFaCyQ0AALASTG4AAICVYHIDAACsBJMbAABgJczJ/T/NJH5nUahHxQAAAABJRU5ErkJggg==" alt="" />安装成功
1第二种:
下载 xlrd 包 链接:http://pan.baidu.com/s/1qX9kGJq 密码:nsdb
如我把它们解压到F:DOWNLOAD下。
在win7下打开cmd,在命令行输入F:,切换到F盘,再cd DOWNLOAD\xlrd-0.7.7,
最后 setup.py install.装完了
# conding=utf-
from appium import webdriver
import time
import sys
import re
import HTMLTestRunner
import unittest
import xlrd
from xlrd import open_workbook
class Login(unittest.TestCase): def test_login(self):
self.data = open_workbook('D:\\test.xls') #打开文件
self.table = self.data.sheet_by_index() #遍历所有数据
aa=self.table.row_values() #获取整列数据
print(aa[]) if __name__ == '__main__':
suite = unittest.TestSuite()
suite.addTest(Login('test_login'))
timestr = time.strftime('%Y%m%d%H%M%S',time.localtime(time.time()))
filename = "D:\\result_" + timestr + ".html"
print (filename)
fp = open(filename, 'wb')
runner = HTMLTestRunner.HTMLTestRunner(
stream=fp,
title='测试结果',
description='测试报告'
)
#suite = unittest.TestLoader().loadTestsFromTestCase(ContactsAndroidTests)
#unittest.TextTestRunner(verbosity=).run(suite)
runner.run(suite)
#g_browser.quit()
fp.close() #测试报告关闭
python-xlrd 实现excel 导入数据的更多相关文章
- Excel导入数据到Sql server 中出错:“文本被截断,或者一个或多个字符在目标代码页中没有匹配项”
从Excel导入数据到Sql server 时,由于表中的数据有的很长,导入时出现如下错误(如果数据不是很长,255内以内,则不会出现错误): 出错原因: SQL Server的导入导出为了确定数据表 ...
- python批量处理excel文件数据
https://www.zhihu.com/question/39299070?sort=created 作者:水中柳影链接:https://www.zhihu.com/question/392990 ...
- python xlrd读取excel常用方法
最近学习了python操作excel,记录下常用方法. 需要安装xlrd模块, 打开cmd,输入命令:pip install xlrd 进行安装,若已安装显示如下: xlrd读取excel常用方法如 ...
- C#实现Excel模板导出和从Excel导入数据
午休时间写了一个Demo关于Excel导入导出的简单练习 1.窗体 2.引用office命名空间 添加引用-程序集-扩展-Microsoft.Office.Interop.Excel 3.封装的Exc ...
- 项目经验之:再来一章:excel导入数据 封装成最棒的不容易!!!
我见过很的系统,包括OA,ERP,CRM等,在常用的功能当中,从外部导入数据是最常用到的.因为很多客户需要以excel的形式提供数据,,这样的方式我们又如何做呢, 大家最常见的做法可能是这样的,在需要 ...
- Dynamics CRM EXCEL导入数据字段类型为选项集时的注意事项
在开始先展示下CRM的导入数据涉及选项集字段时的一个问题 下图是选项集字段的属性 下图是我要导入的excel中的列值,可以看出列明和字段名是一致的,而列值却不是选项集中已有的选项 在导入校验时,只要字 ...
- C# Excel导入数据
表 表的创建脚本 CREATE TABLE [dbo].[TB_PROJECTS_New1]( , ) NOT NULL, ) NULL, ) NULL, , ) NULL, , ) NULL, , ...
- Open XML操作Excel导入数据
项目中发现使用OleDb(using System.Data.OleDb)相关对象处理Excel导入功能,不是很稳定经常出问题,需要把这个问题解决掉.项目组提出使用OpenXML来处理Excel的导入 ...
- python xlrd读Excel表
1 xlrd第三方库 注意:xlrd较新版本不支持读xlsx表,需安装1.2.0版本(pip install xlrd==1.2.0)或使用其他库. xlrd库官方文档:https://xlrd.re ...
- 使用python向Redis批量导入数据
1.使用pipeline进行批量导入数据.包含先使用rpush插入数据,然后使用expire改动过期时间 class Redis_Handler(Handler): def connect(self) ...
随机推荐
- Python日期时间函数
所有日期.时间的api都在datetime模块内. 1. 日期输出格式化 datetime => string import datetime now = datetime.datetime.n ...
- JavaScript实现的功能
1.js事件阻止冒泡的应用 1)问题描述: 单机除了这两个元素,触发事件,: 可用阻止事件冒泡 2)解决方法: $('body').click(function(e){ $('#searchTree' ...
- 设置本地wamp环境挂载多站点同时运行
之前写过一篇关于在Linux环境下配置虚拟主机的文章:现在又有一种场景:在本地同时写多个项目:可本地的wamp环境下默认只有一个www目录:这样经常修改目录很痛苦:那么幸福就这么猝不及防的来了:下面就 ...
- Kafka详解六:Kafka如何通过源码实现监控
问题导读: 1.kafka的消费者组的消费偏移存储,kafka支持两个版本? 2.ConsumerOffsetChecker类的作用是什么? 3.Kafka如何通过源码实现 ...
- HDU 2430 Beans (单调队列+公式化简)
题意:给你n袋豆子,每袋都有w[i]个豆子,接着任选连续任意个袋子的豆子合在一起放入容量为p的多个袋子里(每个袋子必须放满),问剩余的豆子数<=k时,能放满最多的袋子的个数 题解:个数与p都比较 ...
- super和this 在构造方法上的用法
super Super()表示调用父类的构造方法.如果没有定义构造方法,那么就会调用父类的无参构造方法,即super(). this 在构造方法中,this表示本类的其他构造方法:student(st ...
- 什么是CDN 域名预热
通常大家理解的预热功能是,缓存预热.将需要预热的资源推送到CDN边缘节点,用户访问时将不需要再回源站,可以直接命中缓存.这样可以加快资源的首次访问,同时缓解突增回源流量给源站造成的压力.这里说的是域名 ...
- 比较好的sql写法
DECLARE @beginTime VARCHAR(20)= '2017-11-13 00:00:00';DECLARE @endTime VARCHAR(20)= '2017-11-13 23:0 ...
- SpringBoot发布到独立的tomcat中运行
在此文基础上 Eclipse下利用Maven创建SpringBoot的Restful风格程序 spring-boot默认提供内嵌的tomcat,所以打包直接生成jar包,用java -jar命令就可以 ...
- review32
一个类的两个对象如果具有相同的引用,那么他们就具有相同的实体和功能.