lyb_dsa 发表于 2003-10-20 16:01:00

请教如何使用与EXCEL相关的函数操作

本人想学习如何从CAD打开EXCEL并读其中的数据,以下是用vlax-dump-object函数列出与EXCEL有关的属性。看的一头雾水,不知如何使用。不知那位高手能提供相关的资料或与之相关的程序(要有源代码),叫俺好好学习学习。
; Property values:
;   ActiveCell (RO) = nil
;   ActiveChart (RO) = 发生意外。
;   ActivePrinter = "Ne01: 的 \\\\DP3002\\dp3002-1"
;   ActiveSheet (RO) = nil
;   ActiveWindow (RO) = nil
;   ActiveWorkbook (RO) = nil
;   AddIns (RO) = #<VLA-OBJECT AddIns 0020658c>
;   AlertBeforeOverwriting = -1
;   AltStartupPath = ""
;   AnswerWizard (RO) = #<VLA-OBJECT AnswerWizard 0018004c>
;   Application (RO) = #<VLA-OBJECT _Application 0bb29f7c>
;   AskToUpdateLinks = -1
;   Assistant (RO) = #<VLA-OBJECT Assistant 00167f2c>
;   AutoCorrect (RO) = #<VLA-OBJECT AutoCorrect 00167b34>
;   AutoPercentEntry = -1
;   Build (RO) = 2823.0
;   CalculateBeforeSave = -2146826246
;   Calculation = -2146826246
;   CalculationVersion (RO) = 92512
;   Caller (RO) = ...Indexed contents not shown...
;   CanPlaySounds (RO) = 0
;   CanRecordSounds (RO) = 0
;   Caption = "Microsoft Excel"
;   CellDragAndDrop = -1
;   Cells (RO) = 发生意外。
;   Charts (RO) = 发生意外。
;   ClipboardFormats (RO) = ...Indexed contents not shown...
;   Columns (RO) = 发生意外。
;   COMAddIns (RO) = #<VLA-OBJECT COMAddIns 001c4fa4>
;   CommandBars (RO) = #<VLA-OBJECT _CommandBars 00168b5c>
;   CommandUnderlines = -4105
;   ConstrainNumeric = 0
;   ControlCharacters = 0
;   CopyObjectsWithCells = -1
;   Creator (RO) = 1480803660
;   Cursor = -4143
;   CursorMovement = 0
;   CustomListCount (RO) = 11.0
;   CutCopyMode = 0
;   DataEntryMode = -4146
;   DDEAppReturnCode (RO) = 0.0
;   DefaultFilePath = "C:\\Documents and Settings\\kl51.KL\\My Documents"
;   DefaultSaveFormat = -4143
;   DefaultSheetDirection = 0
;   DefaultWebOptions (RO) = #<VLA-OBJECT DefaultWebOptions 001651ac>
;   Dialogs (RO) = #<VLA-OBJECT Dialogs 0017eb6c>
;   DisplayAlerts = -1
;   DisplayClipboardWindow = Microsoft Excel: 不能取得类 Application 的 DisplayClipboardWindow 属性
;   DisplayCommentIndicator = -1
;   DisplayExcel4Menus = 0
;   DisplayFormulaBar = -1
;   DisplayFullScreen = 0
;   DisplayNoteIndicator = -1
;   DisplayRecentFiles = -1
;   DisplayScrollBars = -1
;   DisplayStatusBar = -1
;   EditDirectlyInCell = -1
;   EnableAnimations = -1
;   EnableAutoComplete = -1
;   EnableCancelKey = 1
;   EnableEvents = -1
;   EnableSound = 0
;   Excel4IntlMacroSheets (RO) = 发生意外。
;   Excel4MacroSheets (RO) = 发生意外。
;   ExtendList = -1
;   FeatureInstall = 0
;   FileConverters (RO) = ...Indexed contents not shown...
;   FileFind (RO) = 发生意外。
;   FileSearch (RO) = #<VLA-OBJECT FileSearch 00165604>
;   FixedDecimal = 0
;   FixedDecimalPlaces = 2
;   Height = 456.0
;   IgnoreRemoteRequests = 0
;   Interactive = -1
;   International (RO) = ...Indexed contents not shown...
;   Iteration = -2146826246
;   LanguageSettings (RO) = #<VLA-OBJECT LanguageSettings 001802f4>
;   Left = -2.0
;   LibraryPath (RO) = "C:\\Program Files\\Microsoft Office\\Office\\LIBRARY"
;   MailSession (RO) = nil
;   MailSystem (RO) = 1.0
;   MathCoprocessorAvailable (RO) = -1
;   MaxChange = -2146826246
;   MaxIterations = -2146826246
;   MemoryFree (RO) = 1.04858e+006
;   MemoryTotal (RO) = 1.38854e+006
;   MemoryUsed (RO) = 339960.0
;   MouseAvailable (RO) = -1
;   MoveAfterReturn = -1
;   MoveAfterReturnDirection = -4121
;   Name (RO) = "Microsoft Excel"
;   Names (RO) = 发生意外。
;   NetworkTemplatesPath (RO) = ""
;   ODBCErrors (RO) = #<VLA-OBJECT ODBCErrors 001e420c>
;   ODBCTimeout = 45
;   OLEDBErrors (RO) = #<VLA-OBJECT OLEDBErrors 0015a514>
;   OnWindow = nil
;   OperatingSystem (RO) = "Windows (32-bit) NT 5.00"
;   OrganizationName (RO) = "kl"
;   Parent (RO) = #<VLA-OBJECT _Application 0bb29f7c>
;   Path (RO) = "C:\\Program Files\\Microsoft Office\\Office"
;   PathSeparator (RO) = "\\"
;   PivotTableSelection = 0
;   PreviousSelections (RO) = ...Indexed contents not shown...
;   ProductCode (RO) = "{00000804-78E1-11D2-B60F-006097C998E7}"
;   PromptForSummaryInfo = 0
;   Range (RO) = ...Indexed contents not shown...
;   RecentFiles (RO) = #<VLA-OBJECT RecentFiles 0016b0fc>
;   RecordRelative (RO) = 0
;   ReferenceStyle = 1
;   RegisteredFunctions (RO) = ...Indexed contents not shown...
;   RollZoom = 0
;   Rows (RO) = 发生意外。
;   ScreenUpdating = -1
;   Selection (RO) = nil
;   Sheets (RO) = 发生意外。
;   SheetsInNewWorkbook = 3.0
;   ShowChartTipNames = -1
;   ShowChartTipValues = -1
;   ShowToolTips = -1
;   ShowWindowsInTaskbar = -1
;   StandardFont = "宋体"
;   StandardFontSize = 12.0
;   StartupPath (RO) = "C:\\Documents and Settings\\kl51.KL\\Application Data\\Microsoft\\Excel\\XLSTART"
;   StatusBar = 0
;   TemplatesPath (RO) = "C:\\Documents and Settings\\kl51.KL\\Application Data\\Microsoft\\Templates\\"
;   ThisWorkbook (RO) = Microsoft Excel: 不能取得类 Application 的 ThisWorkbook 属性
;   Top = -3.0
;   TransitionMenuKey = "/"
;   TransitionMenuKeyAction = 1.0
;   TransitionNavigKeys = 0
;   UsableHeight (RO) = 348.75
;   UsableWidth (RO) = 597.0
;   UserControl = 0
;   UserLibraryPath (RO) = "C:\\Documents and Settings\\kl51.KL\\Application Data\\Microsoft\\AddIns\\"
;   UserName = "kl51"
;   Value (RO) = "Microsoft Excel"
;   VBE (RO) = #<VLA-OBJECT VBE 001780bc>
;   Version (RO) = "9.0"
;   Visible = 0
;   Width = 606.0
;   Windows (RO) = #<VLA-OBJECT Windows 0016f23c>
;   WindowsForPens (RO) = 0
;   WindowState = -4137
;   Workbooks (RO) = #<VLA-OBJECT Workbooks 001743f4>
;   WorksheetFunction (RO) = #<VLA-OBJECT WorksheetFunction 00186784>
;   Worksheets (RO) = 发生意外。
;   _Default (RO) = "Microsoft Excel"

蓝心儿 发表于 2003-10-20 19:22:00

E:\vlisp\database\明经通道-AutoCAD二次开发-Visual LISP-Visual LISP与Excel电子表格.htm

meflying 发表于 2003-10-21 08:11:00

这个你要对Aplication熟悉才行,这些方法的用法,一般来说是要查询相关资料的,如果你熟悉了,才可以直接使用。

蓝心儿:你是要大家去你的电脑上看吗?

在本站二次开发中有相关的简单例子,具体介绍还得找相关资料(我也不知道哪儿有)

蓝心儿 发表于 2003-10-21 10:43:00

哇!!不好意思!想为论坛作点贡献呢,没想到。。。。。。见笑见笑。。

lockmyeye 发表于 2003-10-24 01:39:00

蓝心儿你好逗!

jyzas 发表于 2013-8-1 23:46:51

下来研究下
页: [1]
查看完整版本: 请教如何使用与EXCEL相关的函数操作