Академический Документы
Профессиональный Документы
Культура Документы
FILE
c:\legacyapp\python 2.5\lib\excellib.py
DESCRIPTION
Constants : SAVEAS - Default value for saveas
VISIBLE - Default value for visible
UNVISIBLE - Default value for unvisible
CALCMANUAL - Calculation manual
CALCAUTOMATIC - Calculation automatic
LINE - Chart type line
LINEMARKERS - Chart type markers
LINEMARKERSSTACKED - Chart type markers stacked
LINEMARKERSSTACKED100 - Chart type markers stacked 100
LINESTACKED - Chart type line stacked
LINESTACKED100 - Chart type line stacked 100
COLUMNS - Default value for columns
ROWS - Default value for rows
CATEGORY - Axis type category
VALUE - Axis type value
Version : 2.0
Exceptions : excelliberror
CLASSES
excel12._Application(win32com.client.DispatchBaseClass)
Application
excel12._Chart(win32com.client.DispatchBaseClass)
Chart
excel12._Workbook(win32com.client.DispatchBaseClass)
Workbook
class Application(excel12._Application)
| Syntax : OBJ = excelib.Application()
|
| Description : Class which represents an Excel application.
|
| Return Value: OBJ - Application - The newly created Excel application object.
|
| Attributes : See EXCEL's online help.
|
| Method resolution order:
| Application
| excel12._Application
| win32com.client.DispatchBaseClass
|
| Methods defined here:
|
| AddWorkbook(self)
| Creates a new empty Workbook and returns the object.
| Syntax : WorkBook = OBJ.AddWorkbook()
|
| Parameters : -
|
| Return Value: Ret - Workbook - The created Workbook object.
|
| Exceptions : -
|
| CentimetersToPoints(self, cm_in)
| Converts centimeters to points.
| Syntax : Points = OBJ.CentimetersToPoints(cm_in)
|
| Parameters : cm_in - float - Centimeters to convert.
|
| Return Value: Points - float - Length in points.
|
| Exceptions : TypeError - Parameter has wrong type
|
| GetWorkbook(self, Index)
| Returns an existing workbook specified by the given index.
| Syntax : Ret = OBJ.GetWorkbook(Index)
|
| Parameters : Index - int - Index of the Workbook to be returned.
|
| Return Value: Ret - Workbook - The requested Workbook object.
|
| Exceptions : TypeError - Parameter has wrong type
| excelliberror - Index out of range
|
| Hide(self)
| Hides the EXCEL window.
| Syntax : OBJ.Hide()
|
| Parameters : -
|
| Return Value: -
|
| Exceptions : -
|
| InchesToPoints(self, in_in)
| Converts Inches to points.
| Syntax : Points = OBJ.InchesToPoints(in_in)
|
| Parameters : in_in - float - Inches to convert.
|
| Return Value: Points - float - Length in points.
|
| Exceptions : TypeError - Parameter has wrong type
|
| MillimetersToPoints(self, mm_in)
| Converts millimeter to points.
| Syntax : Points = OBJ.MillimetersToPoints(mm_in)
|
| Parameters : mm_in - float - Millimeters to convert.
|
| Return Value: Points - float - Length in points.
|
| Exceptions : TypeError - Parameter has wrong type
|
| OpenWorkbook(self, Filename)
| Opens an existing workbook with the given name.
| Syntax : Ret = OBJ.OpenWorkbook(Filename)
|
| Parameters : Filename - string - Pathname of the workbook to be opened.
|
| Return Value: Ret - Workbook - The opened Workbook object.
|
| Exceptions : TypeError - Parameter has wrong type
| TypeError - File does not exist
|
| PointsToCentimeters(self, po_in)
| Converts points to centimeters.
| Syntax : Centimeters = OBJ.PointsToCentimeters(po_in)
|
| Parameters : po_in - float - Points to convert.
|
| Return Value: Centimeters - float - Length in centimeters.
|
| Exceptions : TypeError - Parameter has wrong type
|
| PointsToInches(self, po_in)
| Converts points to Inches.
| Syntax : Inches = OBJ.PointsToInches(po_in)
|
| Parameters : po_in - float - Points to convert
|
| Return Value: Inches - float - Length in Inches
|
| Exceptions : TypeError - Parameter has wrong type
|
| PointsToMillimeters(self, po_in)
| Converts points to millimeter.
| Syntax : Millimeters = OBJ.PointsToMillimeters(po_in)
|
| Parameters : po_in - float - Points to convert.
|
| Return Value: Millimeters - float - Length in millimeters.
|
| Exceptions : TypeError - Parameter has wrong type
|
| Quit(self, Savechanges=-1)
| Closes the application.
| Syntax : OBJ.Quit([Savechanges=TRUE])
|
| Description : Hides the application window and closes all documents. If type is
| Savechanges then all workbooks are saved before they are closed.
|
| Parameters : Savechanges - boolean - Save the changes before closing.
|
| Return Value: -
|
| Exceptions : TypeError - Parameter has wrong type
|
| Show(self)
| Shows the EXCEL window.
| Syntax : OBJ.Show()
|
| Parameters : -
|
| Return Value: -
|
| Exceptions : -
|
| __init__(self)
| Creates an Excel application object.
|
| __repr__(self)
|
| ----------------------------------------------------------------------
class Chart(excel12._Chart)
| Description : Class which represents an Excel chart object. To access these object use the
application class e.g. Application.Charts[0]
| Application.Charts.Item("Chartname")
|
| Attributes : See EXCEL's online help.
|
| Method resolution order:
| Chart
| excel12._Chart
| win32com.client.DispatchBaseClass
|
| Methods defined here:
|
| SetChartAppearance(self, **Parms)
| Sets the appearance of the chart
| Syntax : OBJ.SetChartAppearance([YGridLines = ],[xGridLines = ])
|
| Parameters : YGridLines - boolean - Flag to show y-gridlines of the chart.
| XGridLines - boolean - Flag to show x-gridlines of the chart.
| Return Value: -
|
| Exceptions : TypeError - Parameter has wrong type
| AttributeError - The paramter given is not available in the function.
|
| SetChartLegend(self, **Parms)
| Sets the legend properties of the chart
| Syntax : OBJ.SetChartLegend([Show = ] [,BorderWeight = ]
| [,BorderLineStyle = ] [,Shadow = ]
| [,ColorIndex = ] [,AutoScaleFont = ])
|
| Parameters : Show - boolean - Visible flag for the chart legend.
| BorderWeight - XlBorderWeight - Weight of the border around the chartlegend..
| BorderLineStyle - XlLineStyle - Style of the border around the chart legend.
| Shadow - boolean - Shadow flag for the chart legend.
| ColorIndex - int - Colorindex of the interior of the legend.
| AutoScaleFont - boolean - Type of font scaling for the chart legend.
|
| Return Value: -
|
| Exceptions : TypeError - Parameter has wrong type
| AttributeError - The parameter given is not available in the function.
|
| Save(self, OverWriteExisting=0)
| Saves an open workbook
| Syntax : OBJ.Save()
|
| Description : If the workbook has no filename the file will be saved to the default file path with
the document title. If the file already exists it depends on the overwriteexisting flag if an exception will
be raised.
|
| Parameters : OverWriteExisting - boolean - If true any existing file will be overwritten (default
false).
|
| Return Value: -
|
| Exceptions :
|
FUNCTIONS
SetFont(Font, **Parms)
Sets the properties of a given font.
Syntax : SetFont(Font [,Color = ] [,ColorIndex = ] [,Style = ] [,Name = ]
[,Size = ] [,Bold = ] [,Outlinefont = ] [,Italic = ]
[,Shadow = ] [,Strikethrough = ] [,Subscript = ]
[,Superscript = ] [,Underline = ])
Return Value: -
DATA
CALCAUTOMATIC = 4294963191L
CALCMANUAL = 4294963161L
CATEGORY = 1
COLUMNS = 2
FALSE = 0
LINE = 4
LINEMARKERS = 65
LINEMARKERSSTACKED = 66
LINEMARKERSSTACKED100 = 67
LINESTACKED = 63
LINESTACKED100 = 64
ROWS = 1
SAVEAS = 2
TRUE = -1
UNVISIBLE = 0
VALUE = 2
VISIBLE = -1
__Author__ = '$Author: Stefanm $'
__Revision__ = '$Revision: 21 $'
__version__ = '2.0'
excelliberror = 'excellib Error'
VERSION
2.0