我正在尝试过滤我的工作表
=filter({B:B}, regexmatch({B:B}, $A$1))
Run Code Online (Sandbox Code Playgroud)
是否可以使正则表达式不区分大小写?
我知道如何div在以下位置找到button:
//button/div[contains(text(),'Save')]
Run Code Online (Sandbox Code Playgroud)
我想知道是否可以找到任何button包含 div 且"Save"内部有文本的内容?

<button class="PinBetterSave__Button" data-test-id="PinBetterSaveButton"><div class="_w7 _0 _1 _2 _wa _36 _d _b _6">Save</div></button>
Run Code Online (Sandbox Code Playgroud) 我正在尝试column width使用 Google Sheets API 进行更改。我知道spreadsheetId我可以得到ss_drive.get('id'),但我不知道如何得到sheetId:
ss_drive = drive_api.files().create(body=file_metadata).execute()
ssId = ss_drive.get('id')
sheets_api = build('sheets', 'v4', credentials=credentials)
requests = []
requests.append({
"updateDimensionProperties": {
"range": {
"sheetId": sheetId,
"dimension": "COLUMNS",
"startIndex": 0,
"endIndex": 1
},
"properties": {
"pixelSize": 160
},
"fields": "pixelSize"
}
})
response = sheets_api.spreadsheets().batchUpdate(
spreadsheetId=ssId, body={'requests': requests}).execute()
Run Code Online (Sandbox Code Playgroud)
我"sheetId": sheetId改为"sheetId": 0. 并且该列的宽度也发生了变化。
从文件“C:\1.xlsx”中获取单元格 A1 值的代码应该是什么样的?我尝试了许多示例,但仍然无法使其正常工作。
var Excel = require('exceljs');
var workbook = new Excel.Workbook();
workbook.xlsx.readFile("C:\1.xlsx")
.then(function() {
var worksheet = workbook.getWorksheet('Sheet1');
var cell = worksheet.getCell('A1').value;
console.log(cell);
});
Run Code Online (Sandbox Code Playgroud)
我没有看到任何错误,但它不起作用。
近日,谷歌发布了谷歌助手新的“阅读”功能。
我如何用 Python 尝试它?我在控制台中启用了 Google Assistant API并创建了服务帐户凭据。该文档不提供任何 Python 实现。
我想运行一个简单的“Hello world”示例:发送文本并获取 wav 文件。
python google-api python-3.x google-assist-api google-assistant-sdk
此代码打开一个新的 chrome 选项卡,并将整个 chrome 窗口放在所有其他正在运行的程序后面:
Browser = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
URL = "http://cyberforum.ru"
Name = Mid(Browser, InStrRev(Browser, "\") + 1)
For Each P In GetObject("winmgmts:\\.\root\CIMV2")._
ExecQuery("Select ParentProcessID from Win32_Process Where Name = '" & Name & "'")
PID = P.ParentProcessID : If InStr(PIDs & " ", " " & PID & " ") Then Exit For
PIDs = PIDs & " " & PID
Next
With CreateObject("WScript.Shell")
Set Exe = .Exec(Browser & " " & URL)
If IsEmpty(PID) Then PID …Run Code Online (Sandbox Code Playgroud) 我正在尝试计算 column 中所有字符串长度的总和,这些字符串与 columnB中的intorfloat数字位于同一行A。如何对列中的任何值组合循环执行此操作A?我完全迷失了 Excel 的 if 和 cycle 表示法。
Service Account Credentials 我在这里创建并得到了 json key service.json。
然后我尝试:
from google.oauth2 import service_account
SCOPES = ['https://www.googleapis.com/auth/spreadsheets']
credentials = service_account.Credentials.from_service_account_file(
'service.json', scopes=SCOPES)
drive = build('drive', 'v3', credentials=credentials)
file_metadata = {
'name': 'sampleName',
'parents': ['#### folderId ###'],
'mimeType': 'application/vnd.google-apps.spreadsheet',
}
res = drive.files().create(body=file_metadata).execute()
print(res)
Run Code Online (Sandbox Code Playgroud)
有错误:
<HttpError 403 when requesting https://www.googleapis.com/drive/v3/files?alt=json returned "Insufficient Permission: Request had insufficient authentication scopes.">
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "dailyLimitExceededUnreg",
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.",
"extendedHelp": "https://code.google.com/apis/console" …Run Code Online (Sandbox Code Playgroud) python google-authentication google-drive-api google-console-developer google-sheets-api
python ×3
xls ×2
xlsx ×2
autohotkey ×1
excel ×1
exceljs ×1
google-api ×1
html ×1
javascript ×1
python-3.x ×1
regex ×1
xlsxwriter ×1
xml ×1
xpath ×1