python调用excel的书_如何在Python中读取excel单元格并保留或检测其格式

Default Formatting

Default formatting is applied to all empty cells (those not described

by a cell record). Firstly row default information (ROW record,

Rowinfo class) is used if available. Failing that, column default

information (COLINFO record, Colinfo class) is used if available. As a

last resort the worksheet/workbook default cell format will be used;

this should always be present in an Excel file, described by the XF

record with the fixed index 15 (0-based). By default, it uses the

worksheet/workbook default cell style, described by the very first XF

record (index 0). Formatting features not included in xlrd version

0.6.1

Rich text i.e. strings containing partial bold italic and underlined

text, change of font inside a string, etc. See OOo docs s3.4 and s3.2

Asian phonetic text (known as "ruby"), used for Japanese furigana. See

OOo docs s3.4.2 (p15) Conditional formatting. See OOo docs s5.12,

s6.21 (CONDFMT record), s6.16 (CF record) Miscellaneous sheet-level

and book-level items e.g. printing layout, screen panes. Modern Excel

file versions don't keep most of the built-in "number formats" in the

file; Excel loads formats according to the user's locale. Currently

xlrd's emulation of this is limited to a hard-wired table that applies

to the US English locale. This may mean that currency symbols, date

order, thousands separator, decimals separator, etc are inappropriate.

Note that this does not affect users who are copying XLS files, only

those who are visually rendering cells.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值