56
284
231
后起之秀
(setq XlsApp (vlax-get-or-create-object "Excel.Application") myWBooks (vlax-get-property XlsApp 'Workbooks) myWBook (vla-Add myWBooks) aSht (vlax-get-property XlsApp 'ActiveSheet) cel (vlax-get-property aSht 'Cells) )(vla-put-Visible XlsApp 1)[color=red](setq val (vlax-variant-value (vla-get-Value (vlax-variant-value [/color][color=red](vlax-get-property cel 'Item r c))) ) )[/color]
(vlax-put-property cel 'Item r c value)
使用道具 举报
114
1万
中流砥柱
(vlax-get cel 'item 1 1); error: too many arguments
(vlax-get cel 'item "A1"); error: too many arguments
(vlax-get cel "A1"); error: ActiveX Server returned the error: unknown name: "A1"
(vlax-get cel 'Item r c)
(vlax-dump-object cel t); Range: nil; Property values:; AddIndent = 0; Address (RO) = ...Indexed contents not shown...; AddressLocal (RO) = ...Indexed contents not shown...; AllowEdit (RO) = -1; Application (RO) = #<VLA-OBJECT _Application 18fee4dc>; Areas (RO) = #<VLA-OBJECT Areas 1afea0f4>; Borders (RO) = #<VLA-OBJECT Borders 1afea184>; Cells (RO) = #<VLA-OBJECT Range 1afea214>; Characters (RO) = ...Indexed contents not shown...; Column (RO) = 1; Columns (RO) = #<VLA-OBJECT Range 1afea2a4>; ColumnWidth = 8.43; Comment (RO) = nil; Count (RO) = Exception occurred; CountLarge (RO) = unsupported result type: 20; Creator (RO) = 1480803660; CurrentArray (RO) = Microsoft Office Excel: No cells were found.; CurrentRegion (RO) = #<VLA-OBJECT Range 1afea334>; Dependents (RO) = Microsoft Office Excel: No cells were found.; DirectDependents (RO) = Microsoft Office Excel: No cells were found.; DirectPrecedents (RO) = Microsoft Office Excel: No cells were found.; End (RO) = ...Indexed contents not shown...; EntireColumn (RO) = #<VLA-OBJECT Range 1afea3c4>; EntireRow (RO) = #<VLA-OBJECT Range 1b111314>; Errors (RO) = Exception occurred; Font (RO) = #<VLA-OBJECT Font 1b1113a4>; FormatConditions (RO) = #<VLA-OBJECT FormatConditions 1b111434>; Formula = Exception occurred; FormulaArray = "123"; FormulaHidden = 0; FormulaLocal = Exception occurred; FormulaR1C1 = Exception occurred; FormulaR1C1Local = Exception occurred; HasArray (RO) = 0; HasFormula (RO) = 0; Height (RO) = 1.57286e+007; Hidden = Microsoft Office Excel: Unable to get the Hidden property of the Range class; HorizontalAlignment = 1; Hyperlinks (RO) = #<VLA-OBJECT Hyperlinks 1b1114c4>; ID = ""; IndentLevel = 0; Interior (RO) = #<VLA-OBJECT Interior 1b111554>; Item = ...Indexed contents not shown...; Left (RO) = 0.0; ListHeaderRows (RO) = 0; ListObject (RO) = nil; LocationInTable (RO) = Microsoft Office Excel: Unable to get the LocationInTable property of the Range class; Locked = -1; MDX (RO) = Exception occurred; MergeArea (RO) = Exception occurred; MergeCells = 0; Name = Exception occurred; Next (RO) = #<VLA-OBJECT Range 1b1115e4>; NumberFormat = "General"; NumberFormatLocal = "General"; Offset (RO) = ...Indexed contents not shown...; Orientation = -4128; OutlineLevel = Microsoft Office Excel: Unable to get the OutlineLevel property of the Range class; PageBreak = Microsoft Office Excel: Unable to get the PageBreak property of the Range class; Parent (RO) = #<VLA-OBJECT _Worksheet 1b06702c>; Phonetic (RO) = #<VLA-OBJECT Phonetic 1b110ecc>; Phonetics (RO) = nil; PivotCell (RO) = Exception occurred; PivotField (RO) = Microsoft Office Excel: Unable to get the PivotField property of the Range class; PivotItem (RO) = Microsoft Office Excel: Unable to get the PivotItem property of the Range class; PivotTable (RO) = Microsoft Office Excel: Unable to get the PivotTable property of the Range class; Precedents (RO) = Microsoft Office Excel: No cells were found.; PrefixCharacter (RO) = ""; Previous (RO) = Microsoft Office Excel: Unable to get the Previous property of the Range class; QueryTable (RO) = Exception occurred; Range (RO) = ...Indexed contents not shown...; ReadingOrder = -5002; Resize (RO) = ...Indexed contents not shown...; Row (RO) = 1; RowHeight = 15.0; Rows (RO) = #<VLA-OBJECT Range 1b110f5c>; ServerActions (RO) = Exception occurred; ShowDetail = Microsoft Office Excel: Unable to get the ShowDetail property of the Range class; ShrinkToFit = 0; SmartTags (RO) = #<VLA-OBJECT SmartTags 1b110fec>; SoundNote (RO) = #<VLA-OBJECT SoundNote 1b11107c>; Style = #<VLA-OBJECT Style 1b11110c>; Summary (RO) = Microsoft Office Excel: Unable to get the Summary property of the Range class; Text (RO) = "123"; Top (RO) = 0.0; UseStandardHeight = -1; UseStandardWidth = -1; Validation (RO) = #<VLA-OBJECT Validation 1b11119c>; Value = ...Indexed contents not shown...; Value2 = Exception occurred; VerticalAlignment = -4107; Width (RO) = 786432.0; Worksheet (RO) = #<VLA-OBJECT _Worksheet 1b06702c>; WrapText = 0; XPath (RO) = Microsoft Office Excel: The specified range is invalid due to one or more of the following reasons:•The range refers to cells in more than one column.•The range contains mapped cells from more than one XML map.•The range contains both mapped and unmapped cells.•The range contains both table and non-table cells.•The range is not contiguous.; _Default = ...Indexed contents not shown...; _NewEnum (RO) = #<IUnknown 1b0bfd6c>; Methods supported:; Activate (); AddComment (1); AdvancedFilter (4); ApplyNames (7); ApplyOutlineStyles (); AutoComplete (1); AutoFill (2); AutoFilter (5); AutoFit (); AutoOutline ()