@activepieces/piece-microsoft-excel-365 0.0.18 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/package.json +3 -4
  2. package/src/i18n/de.json +0 -1
  3. package/src/i18n/es.json +0 -1
  4. package/src/i18n/fr.json +0 -1
  5. package/src/i18n/ja.json +0 -1
  6. package/src/i18n/nl.json +0 -1
  7. package/src/i18n/pt.json +0 -1
  8. package/src/i18n/translation.json +0 -1
  9. package/src/i18n/zh.json +0 -1
  10. package/src/index.js +43 -17
  11. package/src/index.js.map +1 -1
  12. package/src/lib/actions/clear-cells-by-range.d.ts +6 -0
  13. package/src/lib/actions/clear-cells-by-range.js +68 -0
  14. package/src/lib/actions/clear-cells-by-range.js.map +1 -0
  15. package/src/lib/actions/clear-column-by-index.d.ts +6 -0
  16. package/src/lib/actions/clear-column-by-index.js +74 -0
  17. package/src/lib/actions/clear-column-by-index.js.map +1 -0
  18. package/src/lib/actions/clear-row-by-id.d.ts +6 -0
  19. package/src/lib/actions/clear-row-by-id.js +70 -0
  20. package/src/lib/actions/clear-row-by-id.js.map +1 -0
  21. package/src/lib/actions/create-worksheet.d.ts +5 -0
  22. package/src/lib/actions/create-worksheet.js +81 -0
  23. package/src/lib/actions/create-worksheet.js.map +1 -0
  24. package/src/lib/actions/find-row.d.ts +7 -0
  25. package/src/lib/actions/find-row.js +107 -0
  26. package/src/lib/actions/find-row.js.map +1 -0
  27. package/src/lib/actions/get-cells-in-range.d.ts +5 -0
  28. package/src/lib/actions/get-cells-in-range.js +44 -0
  29. package/src/lib/actions/get-cells-in-range.js.map +1 -0
  30. package/src/lib/actions/get-row-by-id.d.ts +6 -0
  31. package/src/lib/actions/get-row-by-id.js +61 -0
  32. package/src/lib/actions/get-row-by-id.js.map +1 -0
  33. package/src/lib/actions/get-worksheet-by-id.d.ts +4 -0
  34. package/src/lib/actions/get-worksheet-by-id.js +37 -0
  35. package/src/lib/actions/get-worksheet-by-id.js.map +1 -0
  36. package/src/lib/actions/rename-worksheet.d.ts +5 -0
  37. package/src/lib/actions/rename-worksheet.js +51 -0
  38. package/src/lib/actions/rename-worksheet.js.map +1 -0
  39. package/src/lib/common/common.d.ts +3 -3
  40. package/src/lib/common/common.js +55 -71
  41. package/src/lib/common/common.js.map +1 -1
  42. package/src/lib/trigger/new-row-in-table.d.ts +17 -0
  43. package/src/lib/trigger/new-row-in-table.js +139 -0
  44. package/src/lib/trigger/new-row-in-table.js.map +1 -0
  45. package/src/lib/trigger/new-worksheet.d.ts +8 -0
  46. package/src/lib/trigger/new-worksheet.js +94 -0
  47. package/src/lib/trigger/new-worksheet.js.map +1 -0
  48. package/src/lib/trigger/updated-row.d.ts +14 -0
  49. package/src/lib/trigger/updated-row.js +129 -0
  50. package/src/lib/trigger/updated-row.js.map +1 -0
package/package.json CHANGED
@@ -1,19 +1,18 @@
1
1
  {
2
2
  "name": "@activepieces/piece-microsoft-excel-365",
3
- "version": "0.0.18",
3
+ "version": "0.1.0",
4
4
  "dependencies": {
5
5
  "@sinclair/typebox": "0.34.11",
6
6
  "axios": "1.8.3",
7
7
  "axios-retry": "4.4.1",
8
8
  "deepmerge-ts": "7.1.0",
9
- "fast-glob": "3.3.3",
10
9
  "mime-types": "2.1.35",
11
10
  "nanoid": "3.3.8",
12
11
  "semver": "7.6.0",
13
12
  "zod": "3.25.76",
14
13
  "@activepieces/pieces-common": "0.7.0",
15
- "@activepieces/pieces-framework": "0.18.5",
16
- "@activepieces/shared": "0.20.0",
14
+ "@activepieces/pieces-framework": "0.20.1",
15
+ "@activepieces/shared": "0.22.0",
17
16
  "tslib": "2.8.1"
18
17
  },
19
18
  "overrides": {
package/src/i18n/de.json CHANGED
@@ -1,5 +1,4 @@
1
1
  {
2
- "Microsoft Excel 365": "Microsoft Excel 365",
3
2
  "Spreadsheet software by Microsoft": "Tabellensoftware von Microsoft",
4
3
  "\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and ad": "\n1. Melden Sie sich bei [Microsoft Azure Portal](https://portal.azure.com/).\n. Von der linken Seitenleiste gehen Sie zur **Microsoft Enfra ID**.\n3. Unter **Verwalten** klicken Sie auf **App-Registrierungen**.\n4. Klicken Sie auf die **Neue Registrierung** Schaltfläche.\n5. Geben Sie einen **Name** für Ihre App ein.\n6. Für **unterstützte Kontotypen**, auswählen:\n - **Konten in jedem Organisationsverzeichnis (jeder Microsoft-Entra-ID-Mieter - Multitenant) und persönlichen Microsoft-Konten**\n - Oder wählen Sie nach Ihren Anforderungen aus.\n7. In **Umleitungs-URI** wählen Sie **Web** und fügen Sie die angegebene URL hinzu.\n8. Klicken Sie auf **Registrieren**.\n9. Nach der Registrierung werden Sie zur Übersichtsseite der App weitergeleitet. Kopieren Sie die **Application (Client) ID**.\n10. Vom linken Menü gehen Sie zu **Zertifikate & Geheimnisse**.\n - Unter **Kundengeheimnis**, klicke **Neues Kundengeheimnis**.\n - Geben Sie eine Beschreibung an, setzen Sie ein Ablaufdatum und klicken Sie auf **Hinzufügen**.\n - Kopieren Sie den **Wert** des Client-Geheimnisses (dies wird nicht wieder angezeigt).\n11. Gehe zu **API Berechtigungen** vom linken Menü.\n - Klicke **Berechtigung hinzufügen**.\n - Wähle **Microsoft Graph** → **delegierte Berechtigungen**.\n - Fügen Sie folgende Bereiche hinzu:\n - Dateien. eadWrite\n - offline_access \n - Klicken Sie auf **Berechtigungen hinzufügen**.\n12. Kopieren Sie Ihre **Client-ID** und **Client-Geheimnis**.\n",
5
4
  "Append Row to Worksheet": "Zeile an Arbeitsblatt anhängen",
package/src/i18n/es.json CHANGED
@@ -1,5 +1,4 @@
1
1
  {
2
- "Microsoft Excel 365": "Microsoft Excel 365",
3
2
  "Spreadsheet software by Microsoft": "Software de hoja de cálculo por Microsoft",
4
3
  "\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and ad": "\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and add the given URL.\n8. Click **Register**.\n9. After registration, you’ll be redirected to the app’s overview page. Copy the **Application (client) ID**.\n10. From the left menu, go to **Certificates & secrets**.\n - Under **Client secrets**, click **New client secret**.\n - Provide a description, set an expiry, and click **Add**.\n - Copy the **Value** of the client secret (this will not be shown again).\n11. Go to **API permissions** from the left menu.\n - Click **Add a permission**.\n - Select **Microsoft Graph** → **Delegated permissions**.\n - Add the following scopes:\n - Files.ReadWrite\n - offline_access\n - Click **Add permissions**.\n12. Copy your **Client ID** and **Client Secret**.\n",
5
4
  "Append Row to Worksheet": "Añadir fila a la hoja de trabajo",
package/src/i18n/fr.json CHANGED
@@ -1,5 +1,4 @@
1
1
  {
2
- "Microsoft Excel 365": "Microsoft Excel 365",
3
2
  "Spreadsheet software by Microsoft": "Logiciel de la feuille de calcul par Microsoft",
4
3
  "\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and ad": "\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and add the given URL.\n8. Click **Register**.\n9. After registration, you’ll be redirected to the app’s overview page. Copy the **Application (client) ID**.\n10. From the left menu, go to **Certificates & secrets**.\n - Under **Client secrets**, click **New client secret**.\n - Provide a description, set an expiry, and click **Add**.\n - Copy the **Value** of the client secret (this will not be shown again).\n11. Go to **API permissions** from the left menu.\n - Click **Add a permission**.\n - Select **Microsoft Graph** → **Delegated permissions**.\n - Add the following scopes:\n - Files.ReadWrite\n - offline_access\n - Click **Add permissions**.\n12. Copy your **Client ID** and **Client Secret**.\n",
5
4
  "Append Row to Worksheet": "Ajouter la ligne à la feuille de travail",
package/src/i18n/ja.json CHANGED
@@ -1,5 +1,4 @@
1
1
  {
2
- "Microsoft Excel 365": "Microsoft Excel 365",
3
2
  "Spreadsheet software by Microsoft": "Microsoftによるスプレッドシートソフトウェア",
4
3
  "\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and ad": "\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and add the given URL.\n8. Click **Register**.\n9. After registration, you’ll be redirected to the app’s overview page. Copy the **Application (client) ID**.\n10. From the left menu, go to **Certificates & secrets**.\n - Under **Client secrets**, click **New client secret**.\n - Provide a description, set an expiry, and click **Add**.\n - Copy the **Value** of the client secret (this will not be shown again).\n11. Go to **API permissions** from the left menu.\n - Click **Add a permission**.\n - Select **Microsoft Graph** → **Delegated permissions**.\n - Add the following scopes:\n - Files.ReadWrite\n - offline_access\n - Click **Add permissions**.\n12. Copy your **Client ID** and **Client Secret**.\n",
5
4
  "Append Row to Worksheet": "行をワークシートに追加",
package/src/i18n/nl.json CHANGED
@@ -1,5 +1,4 @@
1
1
  {
2
- "Microsoft Excel 365": "Microsoft Excel 365",
3
2
  "Spreadsheet software by Microsoft": "Spreadsheet software van Microsoft",
4
3
  "\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and ad": "\n1. Log in bij [Microsoft Azure Portal](https://portal.azure.com/).\n. Ga naar **Microsoft Enfra ID**.\n3. Onder **Beheren**, klik op **App registraties**.\n4. Klik op de **Nieuwe registratie** knop.\n5. Voer een **Naam** in voor uw app.\n6. Voor **Ondersteunde accounttypen**, kies keuze:\n - **Accounts in elke map van de organisatie (Any Microsoft Entra ID-tenant - Multitenant) en persoonlijke Microsoft accounts**\n - Of selecteer gebaseerd op uw vereiste.\n7. In **Redirect URI** selecteer **Web** en voeg de opgegeven URL toe.\n8. Klik op **Register**.\n9. Na registratie wordt u doorverwezen naar de overzichtspagina. Kopieer de **Applicatie (client) ID**.\n10. Vanuit het linkermenu ga naar **Certificaten & geheimen**.\n - Klik onder **Client geheimen** op **Nieuwe client geheim**.\n - Geef een beschrijving, verloop, en klik **Toevoegen**.\n - Kopieer de **Waarde** van de client secret (dit zal niet meer worden getoond).\n11. Ga naar **API-rechten** vanuit het linkermenu.\n - Klik **Een machtiging toevoegen**.\n - Selecteer **Microsoft Graph** → **gedelegeerde rechten**.\n - Voeg de volgende toepassingsgebieden toe:\n - Bestanden. eadWrite\n - offline_access \n - Klik **Permissies toevoegen**.\n12. Kopieer uw **Client ID** en **Client Secret**.\n",
5
4
  "Append Row to Worksheet": "Rij toevoegen aan werkblad",
package/src/i18n/pt.json CHANGED
@@ -1,5 +1,4 @@
1
1
  {
2
- "Microsoft Excel 365": "Microsoft Excel 365",
3
2
  "Spreadsheet software by Microsoft": "Software de planilha da Microsoft",
4
3
  "\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and ad": "\n1. Entre no [Microsoft Azure Portal](https://portal.azure.com/).\n. Na barra lateral esquerda, vá até **Microsoft Enfra ID**.\n3. Sob **Gerenciar**, clique em **Aplicativos registrados**.\n4. Clique no botão **Novo registro**.\n5. Digite um **Nome** para o seu aplicativo.\n6. Para **Tipos de conta suportados**, escolha:\n - **Contas em qualquer diretório organizacional (qualquer inquilino de ID da Microsoft Entra - Multitenant) e contas pessoais da Microsoft**\n - Ou selecione com base nos seus requisitos.\n7. Em **URI de redirecionamento**, selecione **Web** e adicione a URL fornecida.\n8. Clique em **Registrar**.\n9. Após o registro, você será redirecionado para a página de visão geral do aplicativo. Copie o **aplicativo (cliente) ID**.\n10. Do menu à esquerda, vá para **Certificados e segredos**.\n - Em **Segredos do Cliente**, clique em **Novo segredo do Cliente**.\n - Fornece uma descrição, define um vencimento e clique em **Adicionar**.\n - Copiar o **Valor** do segredo do cliente (não será mostrado novamente).\n11. Vá para **Permissões da API** no menu à esquerda.\n - Clique em **Adicionar permissão**.\n - Selecione **Microsoft Graph** → **Delegated permissions**.\n - Adicione os seguintes escopos:\n - Arquivos. eadWrite\n - offline_access \n - Clique em **Adicionar permissões**.\n12. Copie seu **ID do Cliente** e **Segredo do Cliente**.\n",
5
4
  "Append Row to Worksheet": "Acrescentar linha à planilha",
@@ -1,5 +1,4 @@
1
1
  {
2
- "Microsoft Excel 365": "Microsoft Excel 365",
3
2
  "Spreadsheet software by Microsoft": "Spreadsheet software by Microsoft",
4
3
  "\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and ad": "\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and add the given URL.\n8. Click **Register**.\n9. After registration, you’ll be redirected to the app’s overview page. Copy the **Application (client) ID**.\n10. From the left menu, go to **Certificates & secrets**.\n - Under **Client secrets**, click **New client secret**.\n - Provide a description, set an expiry, and click **Add**.\n - Copy the **Value** of the client secret (this will not be shown again).\n11. Go to **API permissions** from the left menu.\n - Click **Add a permission**.\n - Select **Microsoft Graph** → **Delegated permissions**.\n - Add the following scopes:\n - Files.ReadWrite\n - offline_access\n - Click **Add permissions**.\n12. Copy your **Client ID** and **Client Secret**.\n",
5
4
  "Append Row to Worksheet": "Append Row to Worksheet",
package/src/i18n/zh.json CHANGED
@@ -1,5 +1,4 @@
1
1
  {
2
- "Microsoft Excel 365": "Microsoft Excel 365",
3
2
  "Spreadsheet software by Microsoft": "Spreadsheet software by Microsoft",
4
3
  "\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and ad": "\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and add the given URL.\n8. Click **Register**.\n9. After registration, you’ll be redirected to the app’s overview page. Copy the **Application (client) ID**.\n10. From the left menu, go to **Certificates & secrets**.\n - Under **Client secrets**, click **New client secret**.\n - Provide a description, set an expiry, and click **Add**.\n - Copy the **Value** of the client secret (this will not be shown again).\n11. Go to **API permissions** from the left menu.\n - Click **Add a permission**.\n - Select **Microsoft Graph** → **Delegated permissions**.\n - Add the following scopes:\n - Files.ReadWrite\n - offline_access\n - Click **Add permissions**.\n12. Copy your **Client ID** and **Client Secret**.\n",
5
4
  "Append Row to Worksheet": "Append Row to Worksheet",
package/src/index.js CHANGED
@@ -11,6 +11,7 @@ const append_table_rows_1 = require("./lib/actions/append-table-rows");
11
11
  const clear_worksheet_1 = require("./lib/actions/clear-worksheet");
12
12
  const convert_to_range_1 = require("./lib/actions/convert-to-range");
13
13
  const create_table_1 = require("./lib/actions/create-table");
14
+ const create_workbook_1 = require("./lib/actions/create-workbook");
14
15
  const delete_table_1 = require("./lib/actions/delete-table");
15
16
  const delete_workbook_1 = require("./lib/actions/delete-workbook");
16
17
  const delete_worksheet_1 = require("./lib/actions/delete-worksheet");
@@ -21,9 +22,20 @@ const get_worksheet_rows_1 = require("./lib/actions/get-worksheet-rows");
21
22
  const get_worksheets_1 = require("./lib/actions/get-worksheets");
22
23
  const lookup_table_column_1 = require("./lib/actions/lookup-table-column");
23
24
  const update_row_1 = require("./lib/actions/update-row");
24
- const common_1 = require("./lib/common/common");
25
+ const clear_cells_by_range_1 = require("./lib/actions/clear-cells-by-range");
26
+ const clear_column_by_index_1 = require("./lib/actions/clear-column-by-index");
27
+ const clear_row_by_id_1 = require("./lib/actions/clear-row-by-id");
28
+ const create_worksheet_1 = require("./lib/actions/create-worksheet");
29
+ const find_row_1 = require("./lib/actions/find-row");
30
+ const get_cells_in_range_1 = require("./lib/actions/get-cells-in-range");
31
+ const get_row_by_id_1 = require("./lib/actions/get-row-by-id");
32
+ const get_worksheet_by_id_1 = require("./lib/actions/get-worksheet-by-id");
33
+ const rename_worksheet_1 = require("./lib/actions/rename-worksheet");
25
34
  const new_row_added_1 = require("./lib/trigger/new-row-added");
26
- const create_workbook_1 = require("./lib/actions/create-workbook");
35
+ const new_row_in_table_1 = require("./lib/trigger/new-row-in-table");
36
+ const new_worksheet_1 = require("./lib/trigger/new-worksheet");
37
+ const updated_row_1 = require("./lib/trigger/updated-row");
38
+ const common_1 = require("./lib/common/common");
27
39
  const authDesc = `
28
40
  1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).
29
41
  2. From the left sidebar, go to **Microsoft Enfra ID**.
@@ -31,21 +43,21 @@ const authDesc = `
31
43
  4. Click the **New registration** button.
32
44
  5. Enter a **Name** for your app.
33
45
  6. For **Supported account types**, choose:
34
- - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**
35
- - Or select based on your requirement.
46
+ - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**
47
+ - Or select based on your requirement.
36
48
  7. In **Redirect URI**, select **Web** and add the given URL.
37
49
  8. Click **Register**.
38
50
  9. After registration, you’ll be redirected to the app’s overview page. Copy the **Application (client) ID**.
39
51
  10. From the left menu, go to **Certificates & secrets**.
40
- - Under **Client secrets**, click **New client secret**.
41
- - Provide a description, set an expiry, and click **Add**.
42
- - Copy the **Value** of the client secret (this will not be shown again).
52
+ - Under **Client secrets**, click **New client secret**.
53
+ - Provide a description, set an expiry, and click **Add**.
54
+ - Copy the **Value** of the client secret (this will not be shown again).
43
55
  11. Go to **API permissions** from the left menu.
44
- - Click **Add a permission**.
45
- - Select **Microsoft Graph** → **Delegated permissions**.
46
- - Add the following scopes:
47
- - Files.ReadWrite
48
- - offline_access
56
+ - Click **Add a permission**.
57
+ - Select **Microsoft Graph** → **Delegated permissions**.
58
+ - Add the following scopes:
59
+ - Files.ReadWrite
60
+ - offline_access
49
61
  - Click **Add permissions**.
50
62
  12. Copy your **Client ID** and **Client Secret**.
51
63
  `;
@@ -64,7 +76,7 @@ exports.microsoftExcel = (0, pieces_framework_1.createPiece)({
64
76
  minimumSupportedRelease: '0.30.0',
65
77
  logoUrl: 'https://cdn.activepieces.com/pieces/microsoft-excel-365.png',
66
78
  categories: [shared_1.PieceCategory.PRODUCTIVITY],
67
- authors: ["BastienMe", "kishanprmr", "MoShizzle", "abuaboud"],
79
+ authors: ['BastienMe', 'kishanprmr', 'MoShizzle', 'abuaboud', 'Pranith124', 'onyedikachi-david'],
68
80
  actions: [
69
81
  append_row_1.appendRowAction,
70
82
  get_worksheets_1.getWorksheetsAction,
@@ -83,16 +95,30 @@ exports.microsoftExcel = (0, pieces_framework_1.createPiece)({
83
95
  append_table_rows_1.appendTableRowsAction,
84
96
  convert_to_range_1.convertToRangeAction,
85
97
  create_workbook_1.createWorkbook,
98
+ clear_column_by_index_1.clearColumnAction,
99
+ clear_cells_by_range_1.clearRangeAction,
100
+ clear_row_by_id_1.clearRowAction,
101
+ create_worksheet_1.createWorksheetAction,
102
+ find_row_1.findRowAction,
103
+ get_cells_in_range_1.getRangeAction,
104
+ get_row_by_id_1.getRowAction,
105
+ get_worksheet_by_id_1.getWorksheetAction,
106
+ rename_worksheet_1.renameWorksheetAction,
86
107
  (0, pieces_common_1.createCustomApiCallAction)({
87
108
  baseUrl: () => common_1.excelCommon.baseUrl,
88
109
  auth: exports.excelAuth,
89
110
  authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
90
111
  return ({
91
- Authorization: `Bearer ${auth.access_token}`,
112
+ Authorization: `Bearer ${auth.access_token}`
92
113
  });
93
- }),
94
- }),
114
+ })
115
+ })
95
116
  ],
96
- triggers: [new_row_added_1.readNewRows],
117
+ triggers: [
118
+ new_row_added_1.readNewRows,
119
+ new_row_in_table_1.newRowInTableTrigger,
120
+ new_worksheet_1.newWorksheetTrigger,
121
+ updated_row_1.updatedRowTrigger
122
+ ]
97
123
  });
98
124
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/microsoft-excel-365/src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAwE;AACxE,qEAIwC;AACxC,iDAAqD;AACrD,+DAAiE;AACjE,yDAA2D;AAC3D,uEAAwE;AACxE,mEAAqE;AACrE,qEAAsE;AACtE,6DAA+D;AAC/D,6DAA+D;AAC/D,mEAAqE;AACrE,qEAAuE;AACvE,uEAAwE;AACxE,iEAAkE;AAClE,+DAAiE;AACjE,yEAA0E;AAC1E,iEAAmE;AACnE,2EAA4E;AAC5E,yDAA2D;AAC3D,gDAAkD;AAClD,+DAA0D;AAC1D,mEAA+D;AAE/D,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAwBhB,CAAA;AAEY,QAAA,SAAS,GAAG,4BAAS,CAAC,MAAM,CAAC;IACxC,WAAW,EAAE,QAAQ;IACrB,OAAO,EAAE,gEAAgE;IACzE,QAAQ,EAAE,4DAA4D;IACtE,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;IAC5C,MAAM,EAAE,MAAM;CACf,CAAC,CAAC;AAEU,QAAA,cAAc,GAAG,IAAA,8BAAW,EAAC;IACxC,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,mCAAmC;IAEhD,IAAI,EAAE,iBAAS;IACf,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,6DAA6D;IACtE,UAAU,EAAE,CAAC,sBAAa,CAAC,YAAY,CAAC;IACxC,OAAO,EAAE,CAAC,WAAW,EAAC,YAAY,EAAC,WAAW,EAAC,UAAU,CAAC;IAC1D,OAAO,EAAE;QACP,4BAAe;QACf,oCAAmB;QACnB,2CAAsB;QACtB,4BAAe;QACf,sCAAoB;QACpB,wCAAqB;QACrB,kCAAkB;QAClB,sCAAoB;QACpB,kCAAkB;QAClB,mCAAkB;QAClB,yCAAqB;QACrB,gCAAiB;QACjB,gCAAiB;QACjB,6CAAuB;QACvB,yCAAqB;QACrB,uCAAoB;QACpB,gCAAc;QACd,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAW,CAAC,OAAO;YAClC,IAAI,EAAE,iBAAS;YACf,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,aAAa,EAAE,UAAW,IAA4B,CAAC,YAAY,EAAE;iBACtE,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,CAAC,2BAAW,CAAC;CACxB,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/microsoft-excel-365/src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAwE;AACxE,qEAIwC;AACxC,iDAAqD;AAErD,+DAAiE;AACjE,yDAA2D;AAC3D,uEAAwE;AACxE,mEAAqE;AACrE,qEAAsE;AACtE,6DAA+D;AAC/D,mEAA+D;AAC/D,6DAA+D;AAC/D,mEAAqE;AACrE,qEAAuE;AACvE,uEAAwE;AACxE,iEAAkE;AAClE,+DAAiE;AACjE,yEAA0E;AAC1E,iEAAmE;AACnE,2EAA4E;AAC5E,yDAA2D;AAE3D,6EAAsE;AACtE,+EAAwE;AACxE,mEAA+D;AAC/D,qEAAuE;AACvE,qDAAuD;AACvD,yEAAkE;AAClE,+DAA2D;AAC3D,2EAAuE;AACvE,qEAAuE;AAEvE,+DAA0D;AAE1D,qEAAsE;AACtE,+DAAkE;AAClE,2DAA8D;AAE9D,gDAAkD;AAGlD,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAwBhB,CAAC;AAEW,QAAA,SAAS,GAAG,4BAAS,CAAC,MAAM,CAAC;IACxC,WAAW,EAAE,QAAQ;IACrB,OAAO,EAAE,gEAAgE;IACzE,QAAQ,EAAE,4DAA4D;IACtE,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;IAC5C,MAAM,EAAE,MAAM;CACf,CAAC,CAAC;AAEU,QAAA,cAAc,GAAG,IAAA,8BAAW,EAAC;IACxC,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,mCAAmC;IAEhD,IAAI,EAAE,iBAAS;IACf,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,6DAA6D;IACtE,UAAU,EAAE,CAAC,sBAAa,CAAC,YAAY,CAAC;IACxC,OAAO,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,mBAAmB,CAAC;IAChG,OAAO,EAAE;QACP,4BAAe;QACf,oCAAmB;QACnB,2CAAsB;QACtB,4BAAe;QACf,sCAAoB;QACpB,wCAAqB;QACrB,kCAAkB;QAClB,sCAAoB;QACpB,kCAAkB;QAClB,mCAAkB;QAClB,yCAAqB;QACrB,gCAAiB;QACjB,gCAAiB;QACjB,6CAAuB;QACvB,yCAAqB;QACrB,uCAAoB;QACpB,gCAAc;QACd,yCAAiB;QACjB,uCAAgB;QAChB,gCAAc;QACd,wCAAqB;QACrB,wBAAa;QACb,mCAAc;QACd,4BAAY;QACZ,wCAAkB;QAClB,wCAAqB;QACrB,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAW,CAAC,OAAO;YAClC,IAAI,EAAE,iBAAS;YACf,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,aAAa,EAAE,UAAW,IAA4B,CAAC,YAAY,EAAE;iBACtE,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE;QACR,2BAAW;QACX,uCAAoB;QACpB,mCAAmB;QACnB,+BAAiB;KAClB;CACF,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const clearRangeAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ workbook_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
3
+ worksheet_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
4
+ range: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
+ applyTo: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
6
+ }>;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.clearRangeAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const pieces_common_1 = require("@activepieces/pieces-common");
7
+ const index_1 = require("../../index");
8
+ const common_1 = require("../common/common");
9
+ exports.clearRangeAction = (0, pieces_framework_1.createAction)({
10
+ auth: index_1.excelAuth,
11
+ name: 'clear_range',
12
+ displayName: 'Clear Cells by Range',
13
+ description: 'Clear a block of cells (range) content or formatting.',
14
+ props: {
15
+ workbook_id: common_1.excelCommon.workbook_id,
16
+ worksheet_id: common_1.excelCommon.worksheet_id,
17
+ range: pieces_framework_1.Property.ShortText({
18
+ displayName: 'Range',
19
+ description: 'The range of cells to clear, in A1 notation (e.g., "A1:C5").',
20
+ required: true
21
+ }),
22
+ applyTo: pieces_framework_1.Property.StaticDropdown({
23
+ displayName: 'Clear Type',
24
+ description: 'Specify what to clear from the range.',
25
+ required: true,
26
+ defaultValue: 'All',
27
+ options: {
28
+ options: [
29
+ {
30
+ label: 'All (Contents and Formatting)',
31
+ value: 'All'
32
+ },
33
+ {
34
+ label: 'Contents Only',
35
+ value: 'Contents'
36
+ },
37
+ {
38
+ label: 'Formats Only',
39
+ value: 'Formats'
40
+ }
41
+ ]
42
+ }
43
+ })
44
+ },
45
+ run(context) {
46
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
47
+ const { workbook_id, worksheet_id, range, applyTo } = context.propsValue;
48
+ const { access_token } = context.auth;
49
+ if (!/^[A-Z]+[1-9][0-9]*(:[A-Z]+[1-9][0-9]*)?$/.test(range)) {
50
+ throw new Error('Invalid range format. Please use A1 notation (e.g., "A1" or "A1:C5").');
51
+ }
52
+ const response = yield pieces_common_1.httpClient.sendRequest({
53
+ method: pieces_common_1.HttpMethod.POST,
54
+ url: `${common_1.excelCommon.baseUrl}/items/${workbook_id}/workbook/worksheets/${worksheet_id}/range(address='${range}')/clear`,
55
+ authentication: {
56
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
57
+ token: access_token
58
+ },
59
+ body: {
60
+ applyTo: applyTo
61
+ }
62
+ });
63
+ // A successful request returns a 200 OK with no body.
64
+ return response.body;
65
+ });
66
+ }
67
+ });
68
+ //# sourceMappingURL=clear-cells-by-range.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clear-cells-by-range.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/microsoft-excel-365/src/lib/actions/clear-cells-by-range.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,uCAAwC;AACxC,6CAA+C;AAElC,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,iBAAS;IACf,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,uDAAuD;IACpE,KAAK,EAAE;QACL,WAAW,EAAE,oBAAW,CAAC,WAAW;QACpC,YAAY,EAAE,oBAAW,CAAC,YAAY;QACtC,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EACT,8DAA8D;YAChE,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC/B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,KAAK;YACnB,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP;wBACE,KAAK,EAAE,+BAA+B;wBACtC,KAAK,EAAE,KAAK;qBACb;oBACD;wBACE,KAAK,EAAE,eAAe;wBACtB,KAAK,EAAE,UAAU;qBAClB;oBACD;wBACE,KAAK,EAAE,cAAc;wBACrB,KAAK,EAAE,SAAS;qBACjB;iBACF;aACF;SACF,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACzE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;YAEtC,IAAI,CAAC,0CAA0C,CAAC,IAAI,CAAC,KAAe,CAAC,EAAE,CAAC;gBACpE,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;YAC7F,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,GAAG,oBAAW,CAAC,OAAO,UAAU,WAAW,wBAAwB,YAAY,mBAAmB,KAAK,UAAU;gBACtH,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,YAAY;iBACpB;gBACD,IAAI,EAAE;oBACJ,OAAO,EAAE,OAAO;iBACjB;aACF,CAAC,CAAC;YAEH,sDAAsD;YACtD,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const clearColumnAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ workbook_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
3
+ worksheet_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
4
+ column_index: import("@activepieces/pieces-framework").NumberProperty<true>;
5
+ applyTo: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
6
+ }>;
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.clearColumnAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const pieces_common_1 = require("@activepieces/pieces-common");
7
+ const index_1 = require("../../index");
8
+ const common_1 = require("../common/common");
9
+ exports.clearColumnAction = (0, pieces_framework_1.createAction)({
10
+ auth: index_1.excelAuth,
11
+ name: 'clear_column',
12
+ displayName: 'Clear Column by Index',
13
+ description: 'Clear contents/formatting of a column by its index.',
14
+ props: {
15
+ workbook_id: common_1.excelCommon.workbook_id,
16
+ worksheet_id: common_1.excelCommon.worksheet_id,
17
+ column_index: pieces_framework_1.Property.Number({
18
+ displayName: 'Column Index',
19
+ description: 'The 1-based index of the column to be cleared (e.g., 1 for column A, 2 for column B).',
20
+ required: true
21
+ }),
22
+ applyTo: pieces_framework_1.Property.StaticDropdown({
23
+ displayName: 'Clear Type',
24
+ description: 'Specify what to clear from the column.',
25
+ required: true,
26
+ defaultValue: 'All',
27
+ options: {
28
+ options: [
29
+ {
30
+ label: 'All (Contents and Formatting)',
31
+ value: 'All'
32
+ },
33
+ {
34
+ label: 'Contents Only',
35
+ value: 'Contents'
36
+ },
37
+ {
38
+ label: 'Formats Only',
39
+ value: 'Formats'
40
+ }
41
+ ]
42
+ }
43
+ })
44
+ },
45
+ run(context) {
46
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
47
+ const { workbook_id, worksheet_id, column_index, applyTo } = context.propsValue;
48
+ const { access_token } = context.auth;
49
+ if (typeof column_index !== 'number' ||
50
+ !Number.isInteger(column_index) ||
51
+ column_index < 1) {
52
+ throw new Error('Column index must be a positive integer.');
53
+ }
54
+ // Convert 1-based index to Excel column letter (e.g., 1 -> 'A')
55
+ const columnLetter = common_1.excelCommon.numberToColumnName(column_index);
56
+ // Construct the range address for the entire column, e.g., 'C:C'
57
+ const columnAddress = `${columnLetter}:${columnLetter}`;
58
+ const response = yield pieces_common_1.httpClient.sendRequest({
59
+ method: pieces_common_1.HttpMethod.POST,
60
+ url: `${common_1.excelCommon.baseUrl}/items/${workbook_id}/workbook/worksheets/${worksheet_id}/range(address='${columnAddress}')/clear`,
61
+ authentication: {
62
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
63
+ token: access_token
64
+ },
65
+ body: {
66
+ applyTo: applyTo
67
+ }
68
+ });
69
+ // A successful request returns a 200 OK with no body.
70
+ return response.body;
71
+ });
72
+ }
73
+ });
74
+ //# sourceMappingURL=clear-column-by-index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clear-column-by-index.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/microsoft-excel-365/src/lib/actions/clear-column-by-index.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,uCAAwC;AACxC,6CAA+C;AAElC,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,iBAAS;IACf,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,uBAAuB;IACpC,WAAW,EAAE,qDAAqD;IAClE,KAAK,EAAE;QACL,WAAW,EAAE,oBAAW,CAAC,WAAW;QACpC,YAAY,EAAE,oBAAW,CAAC,YAAY;QACtC,YAAY,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC5B,WAAW,EAAE,cAAc;YAC3B,WAAW,EACT,uFAAuF;YACzF,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC/B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,KAAK;YACnB,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP;wBACE,KAAK,EAAE,+BAA+B;wBACtC,KAAK,EAAE,KAAK;qBACb;oBACD;wBACE,KAAK,EAAE,eAAe;wBACtB,KAAK,EAAE,UAAU;qBAClB;oBACD;wBACE,KAAK,EAAE,cAAc;wBACrB,KAAK,EAAE,SAAS;qBACjB;iBACF;aACF;SACF,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,GACxD,OAAO,CAAC,UAAU,CAAC;YACrB,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;YAEtC,IACE,OAAO,YAAY,KAAK,QAAQ;gBAChC,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC;gBAC/B,YAAY,GAAG,CAAC,EAChB,CAAC;gBACD,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;YAC9D,CAAC;YAED,gEAAgE;YAChE,MAAM,YAAY,GAAG,oBAAW,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;YAElE,iEAAiE;YACjE,MAAM,aAAa,GAAG,GAAG,YAAY,IAAI,YAAY,EAAE,CAAC;YAExD,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,GAAG,oBAAW,CAAC,OAAO,UAAU,WAAW,wBAAwB,YAAY,mBAAmB,aAAa,UAAU;gBAC9H,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,YAAY;iBACpB;gBACD,IAAI,EAAE;oBACJ,OAAO,EAAE,OAAO;iBACjB;aACF,CAAC,CAAC;YAEH,sDAAsD;YACtD,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const clearRowAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ workbook_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
3
+ worksheet_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
4
+ row_id: import("@activepieces/pieces-framework").NumberProperty<true>;
5
+ applyTo: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
6
+ }>;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.clearRowAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const pieces_common_1 = require("@activepieces/pieces-common");
7
+ const index_1 = require("../../index");
8
+ const common_1 = require("../common/common");
9
+ exports.clearRowAction = (0, pieces_framework_1.createAction)({
10
+ auth: index_1.excelAuth,
11
+ name: 'clear_row',
12
+ displayName: 'Clear Row by ID',
13
+ description: 'Clear contents/formatting of an entire row by its ID.',
14
+ props: {
15
+ workbook_id: common_1.excelCommon.workbook_id,
16
+ worksheet_id: common_1.excelCommon.worksheet_id,
17
+ row_id: pieces_framework_1.Property.Number({
18
+ displayName: 'Row Number',
19
+ description: 'The number of the row to be cleared (e.g., 5 for the 5th row).',
20
+ required: true,
21
+ }),
22
+ applyTo: pieces_framework_1.Property.StaticDropdown({
23
+ displayName: "Clear Type",
24
+ description: "Specify what to clear from the row.",
25
+ required: true,
26
+ defaultValue: 'All',
27
+ options: {
28
+ options: [
29
+ {
30
+ label: 'All (Contents and Formatting)',
31
+ value: 'All'
32
+ },
33
+ {
34
+ label: 'Contents Only',
35
+ value: 'Contents'
36
+ },
37
+ {
38
+ label: 'Formats Only',
39
+ value: 'Formats'
40
+ }
41
+ ]
42
+ }
43
+ })
44
+ },
45
+ run(context) {
46
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
47
+ const { workbook_id, worksheet_id, row_id, applyTo } = context.propsValue;
48
+ const { access_token } = context.auth;
49
+ if (typeof row_id !== 'number' || !Number.isInteger(row_id) || row_id < 1) {
50
+ throw new Error('Row index must be a positive integer.');
51
+ }
52
+ // Construct the range address for the entire row, e.g., '5:5'
53
+ const rowAddress = `${row_id}:${row_id}`;
54
+ const response = yield pieces_common_1.httpClient.sendRequest({
55
+ method: pieces_common_1.HttpMethod.POST,
56
+ url: `${common_1.excelCommon.baseUrl}/items/${workbook_id}/workbook/worksheets/${worksheet_id}/range(address='${rowAddress}')/clear`,
57
+ authentication: {
58
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
59
+ token: access_token,
60
+ },
61
+ body: {
62
+ applyTo: applyTo,
63
+ },
64
+ });
65
+ // A successful request returns a 200 OK with no body.
66
+ return response.body;
67
+ });
68
+ },
69
+ });
70
+ //# sourceMappingURL=clear-row-by-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clear-row-by-id.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/microsoft-excel-365/src/lib/actions/clear-row-by-id.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyF;AACzF,uCAAwC;AACxC,6CAA+C;AAElC,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,iBAAS;IACf,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,uDAAuD;IACpE,KAAK,EAAE;QACH,WAAW,EAAE,oBAAW,CAAC,WAAW;QACpC,YAAY,EAAE,oBAAW,CAAC,YAAY;QACtC,MAAM,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACpB,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,gEAAgE;YAC7E,QAAQ,EAAE,IAAI;SACjB,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC7B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,qCAAqC;YAClD,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,KAAK;YACnB,OAAO,EAAE;gBACL,OAAO,EAAE;oBACL;wBACI,KAAK,EAAE,+BAA+B;wBACtC,KAAK,EAAE,KAAK;qBACf;oBACD;wBACI,KAAK,EAAE,eAAe;wBACtB,KAAK,EAAE,UAAU;qBACpB;oBACD;wBACI,KAAK,EAAE,cAAc;wBACrB,KAAK,EAAE,SAAS;qBACnB;iBACJ;aACJ;SACJ,CAAC;KACL;IACK,GAAG,CAAC,OAAO;;YACb,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC1E,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;YAEtC,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;gBACxE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;YAC7D,CAAC;YAGD,8DAA8D;YAC9D,MAAM,UAAU,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;YAEzC,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC1C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,GAAG,oBAAW,CAAC,OAAO,UAAU,WAAW,wBAAwB,YAAY,mBAAmB,UAAU,UAAU;gBAC3H,cAAc,EAAE;oBACZ,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,YAAY;iBACtB;gBACD,IAAI,EAAE;oBACF,OAAO,EAAE,OAAO;iBACnB;aACJ,CAAC,CAAC;YAEH,sDAAsD;YACtD,OAAO,QAAQ,CAAC,IAAI,CAAC;QACzB,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const createWorksheetAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ workbook_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
3
+ name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
4
+ headers: import("@activepieces/pieces-framework").ArrayProperty<false>;
5
+ }>;
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createWorksheetAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const index_1 = require("../../index");
7
+ const common_1 = require("../common/common");
8
+ const pieces_common_1 = require("@activepieces/pieces-common");
9
+ exports.createWorksheetAction = (0, pieces_framework_1.createAction)({
10
+ auth: index_1.excelAuth,
11
+ name: 'create_worksheet',
12
+ displayName: 'Create Worksheet',
13
+ description: 'Add a new worksheet (tab) to an existing workbook with optional default headers.',
14
+ props: {
15
+ workbook_id: common_1.excelCommon.workbook_id,
16
+ name: pieces_framework_1.Property.ShortText({
17
+ displayName: 'Worksheet Name',
18
+ description: "The name for the new worksheet. If not provided, a default name like 'Sheet1' will be assigned.",
19
+ required: false
20
+ }),
21
+ headers: pieces_framework_1.Property.Array({
22
+ displayName: 'Headers',
23
+ description: 'Optional: A list of headers to add to the first row. A table will be created from these headers.',
24
+ required: false
25
+ })
26
+ },
27
+ run(context) {
28
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
29
+ const { workbook_id, name, headers } = context.propsValue;
30
+ const { access_token } = context.auth;
31
+ // Step 1: Create the new worksheet
32
+ const createWorksheetResponse = yield pieces_common_1.httpClient.sendRequest({
33
+ method: pieces_common_1.HttpMethod.POST,
34
+ url: `${common_1.excelCommon.baseUrl}/items/${workbook_id}/workbook/worksheets/add`,
35
+ authentication: {
36
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
37
+ token: access_token
38
+ },
39
+ body: Object.assign({}, (name ? { name } : {}))
40
+ });
41
+ const newWorksheetName = createWorksheetResponse.body.name;
42
+ // Step 2: If headers are provided, add them and create a table from them
43
+ if (headers && Array.isArray(headers) && headers.length > 0) {
44
+ const headersArray = headers;
45
+ // Calculate the table range, e.g., "A1:C1" for 3 headers
46
+ const endColumn = common_1.excelCommon.numberToColumnName(headersArray.length);
47
+ const address = `A1:${endColumn}1`;
48
+ // Add the header values to the first row of the new worksheet
49
+ yield pieces_common_1.httpClient.sendRequest({
50
+ method: pieces_common_1.HttpMethod.PATCH,
51
+ url: `${common_1.excelCommon.baseUrl}/items/${workbook_id}/workbook/worksheets/${newWorksheetName}/range(address='${address}')`,
52
+ authentication: {
53
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
54
+ token: access_token
55
+ },
56
+ body: {
57
+ values: [headersArray] // Values must be a 2D array
58
+ }
59
+ });
60
+ // Create a table from the newly added header range
61
+ const createTableResponse = yield pieces_common_1.httpClient.sendRequest({
62
+ method: pieces_common_1.HttpMethod.POST,
63
+ url: `${common_1.excelCommon.baseUrl}/items/${workbook_id}/workbook/worksheets/${newWorksheetName}/tables/add`,
64
+ authentication: {
65
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
66
+ token: access_token
67
+ },
68
+ body: {
69
+ address: address,
70
+ hasHeaders: true
71
+ }
72
+ });
73
+ // Return the result of the table creation
74
+ return createTableResponse.body;
75
+ }
76
+ // If no headers were provided, return the result of the worksheet creation
77
+ return createWorksheetResponse.body;
78
+ });
79
+ }
80
+ });
81
+ //# sourceMappingURL=create-worksheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-worksheet.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/microsoft-excel-365/src/lib/actions/create-worksheet.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,7 @@
1
+ export declare const findRowAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ workbook_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
3
+ worksheet_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
4
+ table_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
5
+ lookup_column: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
6
+ lookup_value: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
+ }>;