Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

python Excel ±à³Ì

1)Excel hyperlink:
xlsApp = win32com.client.Dispatch('Excel.Application')
cell = xls.App.ActiveSheet.Cells(1,1)
cell.Hyperlink.Add(cell,'http://xxx')
2)Excel row/column count:
sht = xlsApp.ActiveSheet
sht.Columns.Areas.Count
sht.Rows.Areas.Count
*************************
£Û1£ÝʹÓÃPyExcelerator¶ÁдEXCELÎļþ(Platform: Win,Unix-like)
Óŵ㣺¼òµ¥Ò×Óà       ȱµã£º²»¿É¸Ä±äÒÑ´æÔÚµÄEXCELÎļþ¡£
PyExceleratorÊÇÒ»¸ö¿ªÔ´µÄMS ExcelÎļþ´¦Àípython°ü¡£ËüÖ÷ÒªÊÇÓÃÀ´Ð´ Excel Îļþ.URL:    http://sourceforge.net/projects/pyexcelerator/
ÎÒûÓÐÕÒµ½¹ØÓÚPyExceleratorµÄÎĵµ¡£Ö»ÊÇ¿´µ½ÁËlimodouµÄһƪ½éÉÜ¡£
http://blog.donews.com/limodou/archive/2005/07/09/460033.aspx
Õâ¸ö°üʹÓÃÆðÀ´»¹ÊDZȽϼòµ¥µÄ£º£©¡£´øÁ˺ܶàСÀý×Ó£¬¿ÉÒÔ²ÎÕÕ¡£
Àýmini.py.
£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½
#!/usr/bin/env python
# -*- coding: windows-1251 -*-
# Copyright (C) 2005 Kiseliov Roman
__rev_id__ = """$Id: mini.py,v 1.3 2005/03/27 12:47:06 rvk Exp $"""
"µ¼ÈëÄ£¿é
from pyExcelerator import *
"Éú³ÉÒ»¸ö¹¤×÷±¡
w = Workbook()
"¼ÓÈëÒ»¸öSheet
ws = w.add_sheet('Hey, Dude')
"±£´æ
w.save('mini.xls')
£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½
[2]ʹÓÃCOM½Ó¿Ú£¬Ö±½Ó²Ù×÷EXCEL(Ö»ÄÜÔÚWinÉÏ)
Óŵ㣺¿ÉÒÔÂú×ã¾ø´óÊýÒªÇó¡£È±µã£ºÓÐЩÂé·³¡£:-)
Õâ·½ÃæµÄÀý×Ӻܶ࣬GOOGLE ¿´°É:-). ÎĵµÒ²¿ÉÒԲο´OFFICE×Ô´øµÄVBA EXCEL °ïÖúÎļþ(VBAXL.CHM)¡£ÕâÀïÃæ½²ÊöÁËEXCEL VBAµÄ±à³Ì¸ÅÄ
²»´íµÄ½Ì³Ì£¡ÁíÍ⣬¡¶Python Programming on Win32¡·ÊéÖÐÒ²ÓкÜÏêϸµÄ½éÉÜ¡£Õâ±¾ÊéÖиø³öÁËÒ»¸öÀàÀ´²Ù×÷EXCEL Îļþ£¬¿ÉÒÔºÜÈÝÒ׵ļÓÒÔÀ©Õ¹¡£
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from win32com.client import Dispatch
import win32com.client
class easyExcel:
      """A utility to make it easier to get at Excel.    Remembering
      to save the data is your problem, as is    error handling.
      Operates on one workbook at a time."""
 


Ïà¹ØÎĵµ£º

PythonÄ£¿éËæÏëËæ¼Ç

ʱ³£¼ûµ½Ò»Ð©ºÃµÄPythonÄ£¿é£¬Èç¹û²»Ëæʱ¼ÇÏ£¬µÈÓõÄʱºòÓÖÊÇÒ»ÕóÂÒ·­£¬ºÃÔÚPythonÒýÓÃÒ»¸öÄ£¿é¼«Æä·½±ã£¬OK£¬·Ï»°ÉÙ˵£º
1. decimal
±ê׼ģ¿é£¬2.4ÒýÈ룬ÓÃÓÚ¸¡µãÊýµÄ¾«È·±íʾ£º
>>> 0.1 + 0.1 + 0.1 - 0.3
5.5511151231257827e-17
>>> from decimal import Decimal
>>> def _(x): retu ......

²Å·¢ÏÖ Python ±»ºÍгÁË

×òÌìÔÚÑо¿Á˼¸ÌìPHP-GTKºó£¬¾ö¶¨×ªÏòPython£¬ÒòΪPython¾ßÓжàÏß³ÌÕâ¸öÌص㣬ÔÚÓëϵͳ½»»¥·½ÃæÒ²±È½ÏÓÐÓÅÊÆ£¬ËäÈ»ÎÒºÜϲ»¶PHP£¬PHPÔÚÍøÒ³·½ÃæÒ²·Ç³£Ç¿´ó£¬µ«±Ï¾¹ÎÒ²»ÊǸãÍøÕ¾¿ª·¢µÄ¡£
ÏëϸöPython°É£¬·¢ÏÖËü¾ÓÈ»±»ºÍгÁË£¬Ì«¹îÒìÁË
°¦£¬ºÍгÓÐÀí£¬ÆÁ±ÎÎÞ× ......

Python ²ÎÊý֪ʶ£¨±äÁ¿Ç°¼ÓÐǺŵÄÒâÒ壩

¹ýÁ¿µÄ²ÎÊý
ÔÚÔËÐÐʱ֪µÀÒ»¸öº¯ÊýÓÐʲô²ÎÊý£¬Í¨³£ÊDz»¿ÉÄܵġ£ÁíÒ»¸öÇé¿öÊÇÒ»¸öº¯ÊýÄܲÙ×÷ºÜ¶à¶ÔÏ󡣸üÓÐÉõÕߣ¬µ÷ÓÃ×ÔÉíµÄº¯Êý±ä³ÉÒ»ÖÖapiÌṩ¸ø¿ÉÓõÄÓ¦Óá£
¶ÔÓÚÕâЩÇé¿ö£¬pythonÌṩÁËÁ½ÖÖÌرðµÄ·½·¨À´¶¨Ò庯ÊýµÄ²ÎÊý£¬ÔÊÐíº¯Êý½ÓÊܹýÁ¿µÄ²ÎÊý£¬²»ÓÃÏÔʽÉùÃ÷²ÎÊý¡£ÕâЩ“¶îÍ┵IJÎÊýÏÂÒ»²½ÔÙ½âÊÍ¡£
×¢Òâa ......

ʹÓÃPython´¦ÀíExcel±í¸ñ

http://cocobear.info/blog/2009/01/16/use-python-deal-with-excel/
ʹÓÃPython´¦ÀíExcel±í¸ñ 2009Äê01ÔÂ16ÈÕ
¸ø°³µÄbossдµÄÒ»¸öС¹¤¾ß£¬Ê¹ÓÃPython¶ÔExcel½øÐÐͳ¼Æ£¬È»ºó°Ñ½áÊøÉú³ÉÒ»¸öеÄExcel±í¸ñ£¬Ê¹Óõ½ÁËxlrdºÍpyExceleratorÁ½¸ö¿â¡£
¼òµ¥µÄ½éÉÜÒ»ÏÂÕâÁ½¸ö¿â£¬ÏÈ˵xlrd£¬Õâ¸ö¿â¶ÁExcel±È½Ï·½±ã£¬¸÷ÖÖ·½·¨Ê¹ÓÃÆ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ