小编kou*_*bin的帖子

VBA:从excel打开单词

我无法从Excel宏(办公室xp)打开Word.如果我使用此代码,它将停止在线Set wdDoc = wordapp.Documents.Open(polozka.ShortPath)并且程序冻结.如果我使用Set wdDoc = GetObject(polozka.ShortPath)而不是这一行,程序在这里停止With wdDoc.Selection"对象不支持此属性..."错误

Dim wordapp As Word.Application
Dim wdDoc As Word.Document

Set fso = CreateObject("Scripting.FileSystemObject")
Set files = fso.GetFolder("C:\path").Files       
Set wordapp = CreateObject("Word.Application")

For Each polozka In files
    Set wdDoc = wordapp.Documents.Open(polozka.ShortPath)
    wordapp.Visible = True
    With wdDoc.Selection
        .HomeKey Unit:=6
        .Find.Text = "Název (typ):"
        .Find.Wrap = wdFindContinue
        ...
    End With
    ...
    wordapp.Quit
    Set wordapp = Nothing    
Next
Run Code Online (Sandbox Code Playgroud)

excel vba ms-word

3
推荐指数
1
解决办法
6万
查看次数

Excel VBA:从在线HTML表中获取内容

任何人都可以请求我显示VBA代码的一部分,它会从这个示例在线HTML表中获得文本"hello"吗?第一个节点将通过他的ID(id ="something")找到.

...
<table id="something">
  <tr>
    <td><TABLE><TR><TD></TD></TR><TR><TD></TD></TR></TABLE></td><td></td>
  </tr>
  <tr>
    <td></td><td></td><td>hello</td>
  </tr>
...
Run Code Online (Sandbox Code Playgroud)

我认为它会是这样的child->sibling->child->sibling->sibling->child,但我不知道确切的方式.

EDIT 更新的代码标签是CAPITALS.所以,如果我使用getElemenetsById("something").getElemenetsByTagName('tr')它只收集两个tr标签,或四个(标签是更深的孩子)?

html excel vba dom

2
推荐指数
1
解决办法
4万
查看次数

LAST_INSERT_ID无法处理UPDATE

如果我使用这个SQL:

UPDATE formulare SET EV_id=59, EV_status=5 WHERE EV_id=57 AND ID_uziv=12;SELECT LAST_INSERT_ID();
Run Code Online (Sandbox Code Playgroud)

我会得到0最后一个插入ID.我正在使用PHP mysqli_insert_id,这里说:

The mysqli_insert_id() function returns the ID generated by a query 
on a table with a column having the AUTO_INCREMENT attribute. 
If the last query wasn't an INSERT or UPDATE statement 
or if the modified table does not have a column with the AUTO_INCREMENT attribute, 
this function will return zero. 
Run Code Online (Sandbox Code Playgroud)

我的表formualreauto increment列,所以我不知道问题是什么

php sql last-insert-id

1
推荐指数
1
解决办法
8224
查看次数

标签 统计

excel ×2

vba ×2

dom ×1

html ×1

last-insert-id ×1

ms-word ×1

php ×1

sql ×1