简体   繁体   English

QueryTables.Add更改行高

[英]QueryTables.Add changes row height

I have the following.. 我有以下..

With ActiveSheet.QueryTables.Add(Connection:="URL;" & qurlname, Destination:=DataSheet.Range(Cells(row_stock + iMax, 29), Cells(row_stock + 199, 29)))
    .BackgroundQuery = True
    .TablesOnlyFromHTML = False
    .Refresh BackgroundQuery:=False
    .SaveData = True
End With

After excution, the rows in question have their height modified from what was originally 15 to 11.25 evidently the minimum for the selected font. 执行后,有问题的行的高度从原来的15更改为11.25,显然是所选字体的最小值。

How can I prevent this? 我该如何预防?

I have no idea why querytables changes the row heights or how to prevent it but I did manage to change things so that the querytables results were placed in a different worksheet. 我不知道为什么查询表会更改行高或如何防止行高,但我确实设法进行了更改,以便将查询表结果放在不同的工作表中。 Copying the cells from that sheet to the main sheet left the row height unchanged. 将单元格从该工作表复制到主工作表将使行高保持不变。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM