如何在Excel VBA中选择特定范围?

时间:2019-07-08 20:05:58

标签: excel vba

我正在尝试选择H列的Range(),从H10一直到H的底部(无界)。我尝试了Range("H10:H"),但没有用。有人知道吗?

2 个答案:

答案 0 :(得分:2)

import csv
import time
from datetime import datetime
import random

import os

#*************SELENIUM RELATED IMPORTS**********************#

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait #selenium specific wait time function
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
# from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.firefox.options import Options as FirefoxOptions
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
options = FirefoxOptions()
#options.add_argument("--headless")
# profile = webdriver.FirefoxProfile()
profile = FirefoxProfile("/Users/jackboland/Library/Application Support/Firefox/Profiles/o8ninv96.SCRAPER_4")
driver = webdriver.Firefox(executable_path='/Users/jackboland/PycharmProjects/geckodriver', firefox_profile=profile, options=options)
driver.maximize_window()

应该这样做。

答案 1 :(得分:0)

我认为这可行。

ActiveWorkbook.Worksheets("name").Cells(1, Columns.Count).End(xlToLeft).Column