Operation Excel class library function Excel file Create a modification cell data format Edit Image Chart Insert Control External Data Add Insert, etc.
Class library download: vbexcelwordedite.rar
Case Demo Download: OfficeDemo.rar
Exceleditor provides the following methods:
'Create an Excel object public sub creat ()' Open an Excel object public sub open parameter description: FileName: Excel file path
'Get a worksheet public function getsheet (Byval Sheetname As String) AS Excel.Worksheet Parameter Description: Sheetname: Worksheet Name
'Add a worksheet public function addsheet (byval sheetname as string) AS Excel.Worksheet
'Delete a worksheet public function Delsheet (Byval Sheetname As String)
'Rename a worksheet
Public Function Renamesheet (Byval NEWSHEETNAME AS STRING) AS Excel.Worksheet
Public Function Renamesheet (Byval Sheet As Excel.Worksheet, Byval Newsheetname As String) AS Excel.Worksheet
'Set the value of a cell
Public Sub SetCellvalue (byval WS as Excel.Worksheet, Byval x as integer, byval y as in integer, byval value as object)
Parameter Description WS: Worksheet to set the value X-line Y column Value Value PUBLIC SUB SetCellvalue (Byval WS AS String, Byval x as integer, byval, byval value as object)
'Set a cell properties font, size, color, alignment
Public Sub SetCellProperty (ByVal ws As Excel.Worksheet, ByVal Startx As Integer, ByVal Starty As Integer, ByVal Endx As Integer, ByVal Endy As Integer, ByVal size As Integer, Optional ByVal name As String = "Arial", Optional ByVal color As Excel.constants = Excel.Constants.xlautomatic, optional byval horizontalalignment as excel.constants = excel.constants.xlleft)
Parameter Description: WS: Worksheet to set the value Startx start cell line Starty start cell column ENDX end cell line endy end cell column Size Font size Name Font Color color horizontalalignment Alignment method
Public Sub SetCellProperty (ByVal wsn As String, ByVal Startx As Integer, ByVal Starty As Integer, ByVal Endx As Integer, ByVal Endy As Integer, Optional ByVal size As Integer = 12, Optional ByVal name As String = "Arial", Optional ByVal color As Excel.Constants = Excel.Constants.xlAutomatic, Optional ByVal HorizontalAlignment As Excel.Constants = Excel.Constants.xlAutomatic.xlRight) 'merged cell Public Sub UniteCells (ByVal ws As Excel.Worksheet, ByVal Startx As Integer, ByVal Starty As Integer, Byval Endx as INTEGER, BYVAL Endy As INTEGER
Parameter Description: WS: Worksheet to set the value of the StartX start cell line Starty start cell column ENDX end cell line endy end cell column
'Insert the data table in the memory to the specified position of the Excel Specify the worksheet to use public subinserttable when using the Movies, use public subinserttable (ByVal Dt As Data.DataTable, Byval WS AS String, Byval Startx as Integer, Byval Starty As Integer )
Public Sub INSERTTABLE (Byval WS as "DORKSHEET, BYVAL STARTX AS INTEGER, BYVAL STARTY AS INTEGER)
'Add a data table in the memory to the specified location of the Excel Specify a worksheet public sub-. DataTable, Byval WS as Excel.Worksheet, Byval Startx As INTEGER, BYVAL STARTY AS INTEGER
'Insert Image Operations "Sub InsertPictures (Byval FileName As String, Byval WS AS String)
Sub InsertPictures (Byval FileName As String, Byval Height As Integer, Byval Width AS Integer), BYVAL WIDTH AS INTEGER
Sub InsertPictures (Byval FileName As String, Byval WS AS String, Byval LEFT AS INTEGER, BYVAL HEIGHT AS INTEGER, BYVAL WIDTH AS Integer)
Insert chart Operation "Public Sub InsertActiveChart (ByVal ChartType As Excel.XlChartType, ByVal ws As String, ByVal DataSourcesX1 As Integer, ByVal DataSourcesY1 As Integer, ByVal DataSourcesX2 As Integer, ByVal DataSourcesY2 As Integer, Optional ByVal ChartDataType As Excel.XlRowCol = Excel. XLROWCOL.XLCOLUMNS parameter description: ChartType is the chart type WS: Table name of the table name DataSourcesx1 Chart Data Source starting unit line DataSourcesy1 Chart Data Source Source The column DataSource Class DataSource End cell line DataSourcesy2 Chart Data Source End Cell Column CHARTDATATYPE Chart Data Data
'Save Document Public Function Save () as Boolean
'Document Save as Public Function Saveas (Byval FileName) AS Boolean
'Close an Excel object, destroy the object public sub close ()
This must be! Otherwise, there is no destruction in the system process, no destruction!
How to use: Quote: vbexcelwordeditor.dll COM reference: Microsoft Excel 10.0 Object Library
Temporarily only do these features, slowly expand
Download 117 times