{"id":123252,"date":"2022-06-27T13:29:29","date_gmt":"2022-06-27T04:29:29","guid":{"rendered":"https:\/\/support.questetra.com\/?p=123252"},"modified":"2023-08-30T09:25:38","modified_gmt":"2023-08-30T00:25:38","slug":"excel-find-row","status":"publish","type":"post","link":"https:\/\/support.questetra.com\/en\/addons\/excel-find-row\/","title":{"rendered":"Microsoft 365 Excel: Find Row Number By Specified Value"},"content":{"rendered":"\n<div style=\"text-align: center; background: #FFFF66; margin: 1em; padding: 1em;\">\n<h3><span class=\"material-icons\">warning<\/span> PAGE UPDATED<\/h3>\n<a href=\"https:\/\/support.questetra.com\/en\/addons\/excel-find-row-202307\/\">https:\/\/support.questetra.com\/en\/addons\/excel-find-row-202307\/<\/a>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><div class=\"su-box su-box-style-soft\" id=\"\" style=\"border-color:#cc66cc;border-radius:0px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#ff99ff;color:#000000;border-top-left-radius:0px;border-top-right-radius:0px\">Microsoft 365 Excel: Find Row Number By Specified Value<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:0px;border-bottom-right-radius:0px\"> Searches the Excel sheet for the specified value and obtains the row number.<\/div><\/div>\n\n\n<div class=\"su-spoiler su-spoiler-style-modern-light su-spoiler-icon-plus-square-1\" data-anchor=\"configs\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>Configs<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">\n<ul class=\"fa-ul\">\n<li><span class=\"fa-li\"><i class=\"fal fa-badge-check fa-lg\"><\/i><\/span> C1: OAuth2 Setting<span style=\"color:#990000;\"> *<\/span><\/li>\n<li><span class=\"fa-li\"><i class=\"far fa-caret-square-down fa-lg\"><\/i><\/span> C2: Target Book URL<span style=\"color:#990000;\"> *<\/span><\/li>\n<li><span class=\"fa-li\"><i class=\"far fa-pen-square fa-lg\"><\/i><\/span> C3: Target Sheet Title<span style=\"color:#990000;\"> *<\/span><span style=\"color:#000099;\"><sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/li>\n<li><span class=\"fa-li\"><i class=\"far fa-pen-square fa-lg\"><\/i><\/span> C4: Target Column(e.g. &#8220;A&#8221;)<span style=\"color:#990000;\"> *<\/span><span style=\"color:#000099;\"><sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/li>\n<li><span class=\"fa-li\"><i class=\"far fa-pen-square fa-lg\"><\/i><\/span> C5: Target Start Row<span style=\"color:#990000;\"> *<\/span><span style=\"color:#000099;\"><sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/li>\n<li><span class=\"fa-li\"><i class=\"fal fa-caret-square-down fa-lg\"><\/i><\/span> C6: String type data item for search value<span style=\"color:#990000;\"> *<\/span><\/li>\n<li><span class=\"fa-li\"><i class=\"fal fa-caret-square-down fa-lg\"><\/i><\/span> C7: String type data item for row number(upate)<span style=\"color:#990000;\"> *<\/span><\/li>\n<\/ul>\n<\/div><\/div>\n\n\n<div class=\"su-spoiler su-spoiler-style-modern-light su-spoiler-icon-plus-square-1 su-spoiler-closed\" data-anchor=\"script\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>Script (click to open)<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>\n\/\/ OAuth2 config sample at [OAuth 2.0 Setting]\n\/\/ - Authorization Endpoint URL: https:\/\/login.microsoftonline.com\/common\/oauth2\/v2.0\/authorize\n\/\/ - Token Endpoint URL: https:\/\/login.microsoftonline.com\/common\/oauth2\/v2.0\/token\n\/\/ - Scope: https:\/\/graph.microsoft.com\/Files.ReadWrite.All offline_access\n\/\/ - Consumer Key: (Get by Microsoft Azure Active Directory)\n\/\/ - Consumer Secret: (Get by Microsoft Azure Active Directory)\n\nconst GRAPH_URI = &quot;https:\/\/graph.microsoft.com\/v1.0\/&quot;;\n\nmain();\nfunction main(){\n\/\/\/\/ == Config Retrieving \/ \u5de5\u7a0b\u30b3\u30f3\u30d5\u30a3\u30b0\u306e\u53c2\u7167 ==\nconst oauth2 = configs.get( &quot;conf_OAuth2&quot; ) + &quot;&quot;;\nconst bookUrl = retrieveBookUrl();\nconst sheetName = configs.get( &quot;conf_Title&quot; ) + &quot;&quot;;\nif(sheetName === &quot;&quot; || sheetName === null){\nthrow &quot;Sheet Title is empty.&quot;;\n}\n\nconst targetColumn = configs.get( &quot;conf_TargetColumn&quot; ) + &quot;&quot;;\nconst startRow = configs.get( &quot;conf_StartRow&quot; ) + &quot;&quot;;\nconst targetData = engine.findData(configs.getObject( &quot;conf_TargetData&quot; )) + &quot;&quot;;\n\nconst rowNumberDataDef = configs.get( &quot;conf_RowNumber&quot; ) + &quot;&quot;;\n\n\/\/\/\/ == Calculating \/ \u6f14\u7b97 ==\n\/\/ Access to the API 1st(Get Book Info)\nconst bookInfo = getFileInfoByUrl( bookUrl, oauth2 );\n\n\/\/ Access to the API 2nd(GET)\nconst rowNumber = getRowNumber( bookInfo.driveId, bookInfo.fileId, sheetName, targetColumn, startRow, targetData, oauth2);\n\n\/\/\/\/ == \u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u30c7\u30fc\u30bf\u3078\u306e\u4ee3\u5165 \/ Data Updating ==\nengine.setDataByNumber( rowNumberDataDef, rowNumber + &quot;&quot;);\n}\n\n\/**\n* config \u304b\u3089\u30d6\u30c3\u30af\u306e URL \u3092\u8aad\u307f\u51fa\u3059\u3001\u7a7a\u306a\u3089\u30a8\u30e9\u30fc\n* @return {String} \u30d6\u30c3\u30af\u306e URL\n*\/\nfunction retrieveBookUrl() {\nconst bookUrlDef = configs.getObject( &quot;conf_Url&quot; );\nlet bookUrl;\nif ( bookUrlDef === null ) {\nbookUrl = configs.get( &quot;conf_Url&quot; )\n}else{\nbookUrl = engine.findData( bookUrlDef );\n}\nif ( bookUrl === &quot;&quot; || bookUrl === null){\nthrow &quot;Book URL is empty.&quot;\n}\nreturn bookUrl;\n}\n\n\/**\n* \u30d5\u30a9\u30eb\u30c0\u306e URL \u304b\u3089\u30d5\u30a1\u30a4\u30eb\u60c5\u5831\uff08\u30c9\u30e9\u30a4\u30d6 ID \u3068\u30d5\u30a1\u30a4\u30eb ID\uff09\u3092\u53d6\u5f97\u3057\u3001\n* \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u8fd4\u3059\uff08URL \u304c\u7a7a\u306e\u5834\u5408\u306f\u30a8\u30e9\u30fc\u3068\u3059\u308b\uff09\n* @param {String} fileUrl \u30d5\u30a9\u30eb\u30c0\u306e URL\n* @param {String} oauth2 OAuth2 \u8a2d\u5b9a\n* @return {Object} fileInfo \u30d5\u30a1\u30a4\u30eb\u60c5\u5831 {driveId, fileId}\n*\/\nfunction getFileInfoByUrl( fileUrl, oauth2 ) {\nlet fileInfo;\nif ( fileUrl !== &quot;&quot; && fileUrl !== null ) {\n\/\/ \u5206\u5272\u4ee3\u5165\nconst {\nid,\nparentReference: {\ndriveId\n}\n} = getObjBySharingUrl( fileUrl, oauth2 );\nfileInfo = {driveId: `drives\/${driveId}`, fileId: id};\n}\nreturn fileInfo;\n}\n\n\/**\n* \u30c9\u30e9\u30a4\u30d6\u30a2\u30a4\u30c6\u30e0\uff08\u30d5\u30a1\u30a4\u30eb\u3001\u30d5\u30a9\u30eb\u30c0\uff09\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3001JSON \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3059\n* API \u306e\u4ed5\u69d8\uff1ahttps:\/\/docs.microsoft.com\/ja-jp\/onedrive\/developer\/rest-api\/api\/shares_get?view=odsp-graph-online\n* @param {String} sharingUrl \u30d5\u30a1\u30a4\u30eb\u306e\u5171\u6709 URL\n* @param {String} oauth2 OAuth2 \u8a2d\u5b9a\n* @return {Object} responseObj \u30c9\u30e9\u30a4\u30d6\u30a2\u30a4\u30c6\u30e0\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u306e JSON \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\n*\/\nfunction getObjBySharingUrl( sharingUrl, oauth2 ) {\nif (sharingUrl === &quot;&quot; || sharingUrl === null) {\nthrow `Sharing URL is empty.`;\n}\n\n\/\/ encoding sharing URL\nconst encodedSharingUrl = encodeSharingUrl(sharingUrl);\n\n\/\/ API Request\nconst response = httpClient.begin()\n.authSetting( oauth2 )\n.get( `${GRAPH_URI}shares\/${encodedSharingUrl}\/driveItem` );\n\nconst responseStr = logAndJudgeError(response, &quot;GET&quot;);\n\nreturn JSON.parse( responseStr );\n}\n\n\/**\n* \u5171\u6709URL\u3092unpadded base64url \u5f62\u5f0f\u306b\u30a8\u30f3\u30b3\u30fc\u30c9\u3059\u308b\n* @param {String} sharingUrl \u5171\u6709 URL\n* @return {String} encodedSharingUrl \u30a8\u30f3\u30b3\u30fc\u30c9\u3055\u308c\u305f\u5171\u6709 URL\n*\/\nfunction encodeSharingUrl( sharingUrl ) {\nlet encodedSharingUrl = base64.encodeToUrlSafeString( sharingUrl );\nwhile ( encodedSharingUrl.slice(-1) === &#39;=&#39; ) {\nencodedSharingUrl = encodedSharingUrl.slice(0,-1);\n}\nreturn `u!${encodedSharingUrl}`;\n}\n\n\/**\n* \u6307\u5b9a\u30b7\u30fc\u30c8\u306e\u6307\u5b9a\u3055\u308c\u305f\u5217\u3092\u6307\u5b9a\u5024\u3067\u691c\u7d22\u3057\u3066\u3001\u30de\u30c3\u30c1\u3057\u305f\u884c\u756a\u53f7\u3092\u8fd4\u3059\n* @param {String,String} driveId, bookId \u53c2\u7167\u5148\u30d5\u30a1\u30a4\u30eb\u306e\u30c9\u30e9\u30a4\u30d6 ID\u3001\u30d5\u30a1\u30a4\u30eb ID\n* @param {String} sheetName \u53c2\u7167\u5148\u30b7\u30fc\u30c8\u306e\u540d\u524d\n* @param {String} targetColumn \u691c\u7d22\u5bfe\u8c61\u5217\n* @param {String} startRow \u691c\u7d22\u5bfe\u8c61\u5217\u306e\u958b\u59cb\u884c\n* @param {String} targetData \u691c\u7d22\u3059\u308b\u5024\n* @param {String} oauth2 OAuth2 \u8a2d\u5b9a\n* @return {Number} rowNumber \u7279\u5b9a\u3057\u305f\u884c\u756a\u53f7\n*\/\nfunction getRowNumber( driveId, bookId, sheetName, targetColumn, startRow, targetData, oauth2 ){\n\nconst getUri = `${GRAPH_URI}${driveId}\/items\/${bookId}\/workbook\/worksheets\/${sheetName}\/usedRange\/`;\nconst response = httpClient.begin()\n.authSetting( oauth2 )\n.get( getUri );\n\nconst responseStr = logAndJudgeError(response, &quot;GET&quot;);\nconst jsonObj = JSON.parse( responseStr );\n\n\/\/\u53d6\u5f97\u3067\u304d\u305f\u30c7\u30fc\u30bf\u306e\u7bc4\u56f2\n\/\/ Index \u306f0\u59cb\u307e\u308a\u3001Count \u306f\u5217\u3084\u884c\u6570\n\/\/ \u4f8b\u3048\u3070 columnIndex \u304c2\u3067\u3001columnCount \u304c3\u306a\u3089\u3001C\u5217\u59cb\u307e\u308a\u3067E\u5217\u307e\u3067\u5024\u3042\u308a\nconst columnIndex = jsonObj.columnIndex;\nconst rowIndex = jsonObj.rowIndex;\nconst columnCount = jsonObj.columnCount;\nconst rowCount = jsonObj.rowCount;\n\n\/\/\u5217\u3092\u6307\u5b9a\u3059\u308b\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u3092\u6570\u5024\u5909\u63db\uff08A\u306a\u30891\u3001B\u306a\u30892\uff09\nconst targetColumnNumber = convertA1toR1C1(targetColumn);\n\n\/\/\u691c\u7d22\u5bfe\u8c61\u5217\u30fb\u958b\u59cb\u884c\u304c\u7bc4\u56f2\u5185\u304b\u30c1\u30a7\u30c3\u30af\nif ((targetColumnNumber &lt; columnIndex + 1) || (columnIndex +\u3000columnCount &lt; targetColumnNumber)) {\nreturn -1;\n} else if ((startRow &lt; rowIndex + 1) || (rowIndex +\u3000rowCount &lt; startRow)) {\nreturn -1;\n}\n\n\/\/\u6307\u5b9a\u5217\u30fb\u958b\u59cb\u884c\u304c\u53d6\u5f97\u914d\u5217\u306e\u3069\u3053\u306b\u5f53\u305f\u308b\u304b\u76f8\u5bfe\u4f4d\u7f6e\u3092\u8a08\u7b97\nconst targetColumnIndex = targetColumnNumber - (columnIndex + 1)\nconst targetRowIndex = startRow - (rowIndex + 1)\n\nfor (let i = targetRowIndex; i &lt; jsonObj.values.length; i++) {\nlet data = jsonObj.values[i][targetColumnIndex] + &quot;&quot;;\nif (targetData == data) {\nreturn i + rowIndex + 1; \/\/\u88dc\u6b63\u3057\u3066\u884c\u756a\u53f7\u3092\u8fd4\u3059\n}\n}\nreturn -1; \/\/\u8a72\u5f53\u884c\u306a\u3057\u306e\u5834\u5408\n}\n\n\/**\n* \u5217\u3092\u6307\u5b9a\u3059\u308b\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u3092\u6570\u5024\u5909\u63db\u3059\u308b\uff08\u4f8b\uff1aA\u21921\u3001C\u21923\uff09\n* @param {String} columnString \u5217\u3092\u6307\u5b9a\u3059\u308b\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\n* @return {Number} num \u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u306b\u5bfe\u5fdc\u3057\u305f\u6570\u5024\n*\/\nfunction convertA1toR1C1(columnString) {\nconst RADIX = 26;\nconst A = &#39;A&#39;.charCodeAt(0);\nlet str = columnString.toUpperCase();\nlet num = 0;\nlet strLength = str.length;\nfor (let i = 0; i &lt; strLength; i++) {\nnum = (num * RADIX) + (str.charCodeAt(i) - A + 1);\n}\nreturn num;\n}\n\n\/**\n* \u30ed\u30b0\u306e\u51fa\u529b\u3068\u3001\u30a8\u30e9\u30fc\u767a\u751f\u6642\u306e\u30b9\u30ed\u30fc\u3092\u884c\u3046\n* @param {HttpResponseWrapper} response \u30ea\u30af\u30a8\u30b9\u30c8\u306e\u5fdc\u7b54\n* @param {String} requestType \u30ea\u30af\u30a8\u30b9\u30c8\u3092\u3069\u306e\u5f62\u5f0f\u3067\u884c\u3063\u305f\u304b(&quot;GET&quot; or &quot;POST&quot; or &quot;PATCH&quot;)\n* @return {String} responseStr \u30ec\u30b9\u30dd\u30f3\u30b9\u306e\u6587\u5b57\u5217\n*\/\nfunction logAndJudgeError(response, requestType){\nconst responseStr = response.getResponseAsString();\nconst status = response.getStatusCode();\nif(status &gt;= 300){\nconst accessLog = `---${requestType} request--- ${status}\\n${responseStr}\\n`;\nengine.log(accessLog);\nthrow `Failed in ${requestType} request. status: ${status}`;\n}\nreturn responseStr;\n}\n<\/code><\/pre><\/div>\n\n\n<\/div><\/div>\n\n\n\n<figure class=\"wp-block-image alignright\"><a href=\"#\"><img decoding=\"async\" src=\"data:image;base64,\niVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAEZklEQVRYR8WXf2xTVRTHv3evo9v6\n+\/XHyuZccRMjc8QRkkFEI9MWJCHBJSgqzIjJshFxjqHGuCAh8VdcJy7DEYyiGY5\/QDFElHaKmZjM\nP3AiatAprcsiLDoawlZbWXvNvesrb91r+waY3qRJ8969537uOd9zzn0EOR5E7f4ljWuLtPpIPSVk\nJQGtAYgLgCWxPgTQIAUZIpSeiE4UfPTnvqNhNbazArieXeNEbOp5QtAEoECNUQARSrEXgub14BvH\nLmRakxHA1eZuIiAdAHQqN06dNklBtwe9\/r3p1qcFcG33vE0omq9x4xnLKEFPsMO3RcmWIoCrzd1H\nQB65EZtLNijowaDX\/2iqzVkAak6+ofYBLHEtQrmtBA6DiG+Gh9B+uCsrr5InZgAkYt4jWVpeeSfu\nr1qGCkcZ5pvsEPUmGAv1yBc0MzY7dnoAT\/W+nBWATaCgzXJNJAGY2kl86jdJcD++8gmK5qkTPQMQ\nBAE2vRlxSkETP\/afEIIuXy8Gf\/9BApykeZpKKTuuAmzzvEkInpFmnes4rupEbBIDWOh0odhk5dDh\nfyN8rUDyUKQtxK4jPXj\/5JGkPUqxO9jpa2UPOAAvMobouDzP5woghWBwx0Es2zWt3xbPRrR4Ns0C\nYHUiellrZcWKAyzY5t4IQnrlR04HwNz7z5UotJp8CHkCX8I8wIbNYMEdpZU4MzqMqXiMe6Om\/HYl\nAIDSTYFO\/wEO4GrzvEuAzekA3vnqEBaXLURtxWIMX\/gDHZ\/tx56GdmgSYmQAI+PnuUhXVa\/A8TMn\nuSmnyYZ7bluqCECB94Je35PTHmhzfweQmnQAbNPOzz9Ad0M7uvs\/xH1Vy\/lJpSHPAnkImuoexnNr\nNit7AHQo4PUvSQB4LsoaC7crD0EsHseLh97C6uq78OnpAbz2UGvS\/VIIWE0oNlphLjIgFL6MWDzG\n09WqN6cBQCjg9YkSAE2VfKoGvh85i\/quFhzeupvHVT7SeWCr+zG0rmpIB4CA10dUATDhdfkPwKIz\nITR5CU9zzV6tYQyAndRuFFFitmP04hivBRpBwAL7TaoAMobg3F+j2NPfh1fXt6Jx\/068tK6ZG5Zr\nYHhsBKLOiLU1K3F06AR\/VWopRt2iWjUhSC9CFv+dH3ejfqmbu\/7rX0\/hi58GsWPdFuQlvMA8MPDL\nKR7\/xnvXo7u\/D5ErUdzqLMcTdz+YXYSZ0pABTETD0M0r4Gk3EQljNDSGm63zk6WaAZRYHHAYRdj0\nFvw9EeIeyBfyYTdYVKThHApRqlilLFCqhBlFKC9EN6IUsz5gN4i8H4xdGudpyDxWJjqzl2JeDa+z\nGd3iKEOxUZzloKl4HI\/vewFnzweS72Y1Iw6Q0o6b6zagqrSCx5bFlQlMpy2ckX5KlVApRCnPlNvx\ndE\/gl9DkhSTVGOsHq6tX8NbrNNt47psK9fjy52+v\/0IibabmSqbilIpTsl7JkhC5vJT+H56Y87Vc\n5oncfZgkIXL5aSZXUs4+Tq9V8WrX\/Qc0OzY\/XizhkgAAAABJRU5ErkJggg==\n\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><i class=\"fal fa-cloud-download-alt\"><\/i> Download<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/drive.google.com\/file\/d\/1KGF5wkpLx5ZVE4ehtfu6GtFdGbEpaqMg\/view?usp=drivesdk\" target=\"_blank\" rel=\"noreferrer noopener\">excel-find-row.xml<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-right has-small-font-size wp-block-paragraph\">2022-06-20 (C) Questetra, Inc. (MIT License)<br><a href=\"https:\/\/support.questetra.com\/en\/bpmn-icons\/excel-find-row\/\">https:\/\/support.questetra.com\/bpmn-icons\/excel-find-row\/<\/a><br><i class=\"fal fa-info-circle\"><\/i> The Addon-import feature is available with <span style=\"color:#4a86e8\" class=\"has-inline-color\"><strong>Professional<\/strong><\/span> edition.<br>Freely modifiable JavaScript (ECMAScript) code. No warranty of any kind.<\/p>\n\n\n<div class=\"su-divider su-divider-style-dashed\" style=\"margin:30px 0;border-width:8px;border-color:#009900\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><i class=\"fal fa-lightbulb-exclamation\"><\/i> Notes<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Returns -1 if there are no applicable rows.<\/li>\n<li>About the settings for integration with Microsoft365 services\n\n<ul class=\"wp-block-list\">\n\n<li>How to register applications on the Microsoft365 (Azure Active Directory) side\n\n<ul class=\"wp-block-list\">\n\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/support.questetra.com\/en\/developer-blog\/office365-app-regist-2\/\" target=\"_blank\">Application Registration Procedure in Office 365 for Linking Office 365 and Questetra Cloud Workflow with API<\/a><\/li>\n\n<\/ul>\n\n<\/li>\n\n\n<li>How to Setup HTTP Authentication on the Questetra side\n\n<ul class=\"wp-block-list\">\n\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/support.questetra.com\/en\/developer-blog\/onedrive-questetra\/\" target=\"_blank\">How to Output Files from Cloud-based Workflow Questetra to OneDrive<\/a>\n\n<ul class=\"wp-block-list\">\n\n<li>&#8220;2.2: OAuth settings on the Questetra side&#8221;<\/li>\n\n<\/ul>\n\n<\/li>\n\n\n<li>\u203b Note: If the Excel Online file is on a SharePoint Online (SPO) document library, the scope that should be specified is different.\n\n<ul class=\"wp-block-list\">\n\n<li>Not on SPO document library \u2192 <a href=\"https:\/\/graph.microsoft.com\/\" rel=\"nofollow\">https:\/\/graph.microsoft.com\/<\/a><strong>Files<\/strong>.ReadWrite offline_access<\/li>\n\n\n<li>On the SPO document library \u2192 <a href=\"https:\/\/graph.microsoft.com\/\" rel=\"nofollow\">https:\/\/graph.microsoft.com\/<\/a><strong>Sites<\/strong>.ReadWrite.All offline_access<\/li>\n\n<\/ul>\n\n<\/li>\n\n<\/ul>\n\n<\/li>\n\n<\/ul>\n\n<\/li>\n<li>If the sheet name contains parentheses or other symbols, an error may occur. If an error occurs, consider changing the sheet name.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><i class=\"fal fa-images\"><\/i> Capture<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"84005\" data-permalink=\"https:\/\/support.questetra.com\/en\/bpmn-icons\/onedrive-file-upload\/attachment\/setting-service-task-pdf-generation-en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/setting-service-task-pdf-generation-en.png?fit=959%2C833&amp;ssl=1\" data-orig-size=\"959,833\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"setting-service-task-pdf-generation-en\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/setting-service-task-pdf-generation-en.png?fit=725%2C630&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-specified-value-settings.jpg?ssl=1\" alt=\"\" class=\"wp-image-84005\" style=\"border:10px solid #aaaaaa; padding:5px; margin:5px;\"><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><i class=\"fal fa-balance-scale\"><\/i> See also<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/support.questetra.com\/en\/bpmn-icons\/excel-row-insert\/\" target=\"_blank\" rel=\"noopener\">Microsoft 365 Excel: Insert New Row<\/a><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/support.questetra.com\/en\/addons\/excel-row-append\/\" target=\"_blank\" rel=\"noopener\">Microsoft 365 Excel: Append New Row<\/a><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/support.questetra.com\/en\/bpmn-icons\/excel-row-get\/\" target=\"_blank\" rel=\"noopener\">Microsoft 365 Excel: Get Row<\/a><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/support.questetra.com\/en\/addons\/excel-row-update\/\" target=\"_blank\" rel=\"noopener\">Microsoft 365 Excel: Update Row<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Searches the Excel sheet for the specified value and obtains the row number.<\/p>\n","protected":false},"author":9,"featured_media":123282,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_uag_custom_page_level_css":"","advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"{title}\n\n{excerpt}\n\n{url}","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[168],"tags":[3160],"class_list":["post-123252","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-addons","tag-microsoft-365"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?fit=1200%2C675&ssl=1","uagb_featured_image_src":{"full":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?fit=1200%2C675&ssl=1",1200,675,false],"thumbnail":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?resize=440%2C440&ssl=1",440,440,true],"medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?fit=560%2C315&ssl=1",560,315,true],"medium_large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?fit=768%2C432&ssl=1",768,432,true],"large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?fit=1024%2C576&ssl=1",1024,576,true],"1536x1536":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?fit=1200%2C675&ssl=1",1200,675,true],"2048x2048":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?fit=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-landscape-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?resize=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-portrait-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?resize=900%2C675&ssl=1",900,675,true],"newspack-article-block-square-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?resize=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-landscape-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?resize=800%2C600&ssl=1",800,600,true],"newspack-article-block-portrait-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?resize=600%2C675&ssl=1",600,675,true],"newspack-article-block-square-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?resize=800%2C675&ssl=1",800,675,true],"newspack-article-block-landscape-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?resize=600%2C450&ssl=1",600,450,true],"newspack-article-block-portrait-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?resize=450%2C600&ssl=1",450,600,true],"newspack-article-block-square-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?resize=600%2C600&ssl=1",600,600,true],"newspack-article-block-landscape-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?resize=400%2C300&ssl=1",400,300,true],"newspack-article-block-portrait-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?resize=300%2C400&ssl=1",300,400,true],"newspack-article-block-square-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?resize=400%2C400&ssl=1",400,400,true],"newspack-article-block-landscape-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?resize=200%2C150&ssl=1",200,150,true],"newspack-article-block-portrait-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?resize=150%2C200&ssl=1",150,200,true],"newspack-article-block-square-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?resize=200%2C200&ssl=1",200,200,true],"newspack-article-block-uncropped":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?fit=1200%2C675&ssl=1",1200,675,true]},"uagb_author_info":{"display_name":"Tsuyoshi Kusaka","author_link":"https:\/\/support.questetra.com\/en\/author\/kusaka0211\/"},"uagb_comment_info":4,"uagb_excerpt":"Searches the Excel sheet for the specified value and obtains the row number.","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9DiIh-w3W","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":94768,"url":"https:\/\/support.questetra.com\/en\/bpmn-icons\/excel-row-insert\/","url_meta":{"origin":123252,"position":0},"title":"Microsoft 365 Excel for Business: Insert New Row","author":"Shiho Tatsumi","date":"2024-06-25","format":false,"excerpt":"This item inserts a new row with data at the specified position in a sheet.","rel":"","context":"In &quot;BPMN Icons&quot;","block_context":{"text":"BPMN Icons","link":"https:\/\/support.questetra.com\/en\/category\/bpmn-icons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/06\/bpmn-icon-Excel-insert-row.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/06\/bpmn-icon-Excel-insert-row.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/06\/bpmn-icon-Excel-insert-row.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/06\/bpmn-icon-Excel-insert-row.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/06\/bpmn-icon-Excel-insert-row.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":82087,"url":"https:\/\/support.questetra.com\/en\/developer-blog\/excel-online-questetra\/","url_meta":{"origin":123252,"position":1},"title":"How to Output Data to Excel Online From the Cloud-based Workflow Questetra (API Integration Setting Procedure)","author":"Tsuyoshi Kusaka","date":"2019-11-06","format":false,"excerpt":"Questetra BPM Suite \u2192 Excel Online \u3078\u306e\u9023\u643a\u306e\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3057\u305f","rel":"","context":"In &quot;Questetra Developers Blog&quot;","block_context":{"text":"Questetra Developers Blog","link":"https:\/\/support.questetra.com\/en\/category\/developer-blog\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/10\/excelonline-questetra-eyecatch.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/10\/excelonline-questetra-eyecatch.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/10\/excelonline-questetra-eyecatch.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/10\/excelonline-questetra-eyecatch.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/10\/excelonline-questetra-eyecatch.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":184672,"url":"https:\/\/support.questetra.com\/en\/addons\/excel-row-range-delete-2026\/","url_meta":{"origin":123252,"position":2},"title":"Microsoft 365 Excel: Delete Row Range","author":"Hirotaka NISHI","date":"2026-05-25","format":false,"excerpt":"Deletes rows in the specified range. Existing cells will be shifted upward.","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/excel-delete-row-fi-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/excel-delete-row-fi-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/excel-delete-row-fi-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/excel-delete-row-fi-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/excel-delete-row-fi-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":184648,"url":"https:\/\/support.questetra.com\/en\/addons\/excel-row-update-2026\/","url_meta":{"origin":123252,"position":3},"title":"Microsoft 365 Excel: Update Row","author":"Hirotaka NISHI","date":"2026-05-25","format":false,"excerpt":"Update data in a specified row of a sheet.","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-update-row-fi-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-update-row-fi-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-update-row-fi-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-update-row-fi-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-update-row-fi-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":188431,"url":"https:\/\/support.questetra.com\/en\/addons\/excel-row-append-2026\/","url_meta":{"origin":123252,"position":4},"title":"Microsoft 365 Excel: Append New Row","author":"Hirotaka NISHI","date":"2026-07-01","format":false,"excerpt":"Adds a row to the end of an Excel sheet and enters data in each of its cells. The input range can be up to 10 columns.","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-append-new-row-fi-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-append-new-row-fi-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-append-new-row-fi-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-append-new-row-fi-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-append-new-row-fi-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":150140,"url":"https:\/\/support.questetra.com\/en\/addons\/excel-find-row-202307\/","url_meta":{"origin":123252,"position":5},"title":"Microsoft 365 Excel: Find Row Number By Specified Value","author":"Tsuyoshi Kusaka","date":"2023-08-04","format":false,"excerpt":"Searches the Excel sheet for the specified value and obtains the row number.","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/06\/excel-find-row-by-specified-value-fi-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"amp_enabled":false,"_links":{"self":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/123252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/comments?post=123252"}],"version-history":[{"count":11,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/123252\/revisions"}],"predecessor-version":[{"id":150579,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/123252\/revisions\/150579"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media\/123282"}],"wp:attachment":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media?parent=123252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/categories?post=123252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/tags?post=123252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}