如何在ListObject中显示向导

问题描述

我正在尝试在ListObject中显示SQL语句的结果。 SQL语句选择的数据在MS-Access表中,并且包含数据类型为guid的列。

像这样创建ListObject对象

set listObj = activeSheet.listObjects.add( _
    sourceType  := xlSrcExternal,_
    source      := array(source),_
    destination := destCell)

source是一个值为OLEDB;provider=Microsoft.ACE.OLEDB.12.0;data source=p:\ath\do\db.accdb的字符串。

我像这样执行select语句

with listObj ' {

    .displayName = "foo"

     with .queryTable ' {

         .commandType            = xlCmdSql
         .commandText            = array("select * from tab")

         .refreshOnFileOpen      = false
         .backgroundQuery        = true
         .refreshStyle           = xlInsertDeleteCells
         .saveData               = true
         .refreshPeriod          = 0
         .preserveColumnInfo     = true

         .refresh backgroundQuery := false

     end with ' }

end with ' }

这将显示查询的结果集,但没有包含GUID的列。

那么,有没有办法添加guid列?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)