<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>excel manipulation on Document Processing REST APIs | GroupDocs Cloud</title>
    <link>https://blog-qa.groupdocs.cloud/fr/tag/excel-manipulation/</link>
    <description>Recent content in excel manipulation on Document Processing REST APIs | GroupDocs Cloud</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>fr</language>
    <lastBuildDate>Fri, 02 Oct 2026 14:32:02 +0000</lastBuildDate><atom:link href="https://blog-qa.groupdocs.cloud/fr/tag/excel-manipulation/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Modifier une feuille Excel via REST en Node.JS</title>
      <link>https://blog-qa.groupdocs.cloud/fr/editor/edit-excel-sheet-via-rest-in-nodejs/</link>
      <pubDate>Fri, 02 Oct 2026 14:32:02 +0000</pubDate>
      
      <guid>https://blog-qa.groupdocs.cloud/fr/editor/edit-excel-sheet-via-rest-in-nodejs/</guid>
      <description>Apprenez à modifier un fichier Excel dans Node.js via REST en utilisant GroupDocs.Editor Cloud SDK. Le guide couvre la configuration, un exemple de code, les appels cURL et les conseils de performance.</description>
      <content:encoded><![CDATA[<p>Automatiser les mises à jour de feuilles de calcul est un besoin courant lors de la création de services web axés sur les données ou de pipelines de reporting. Le <a href="https://products.groupdocs.cloud/editor/nodejs/">GroupDocs.Editor Cloud SDK for Node.js</a> vous permet de modifier un fichier Excel dans Node.js via REST avec seulement quelques lignes de code. Dans ce tutoriel, vous verrez comment configurer le SDK, charger un classeur <a href="https://docs.fileformat.com/spreadsheet/xlsx/">XLSX</a>, modifier une <a href="https://docs.fileformat.com/spreadsheet/cell/">cellule</a>, enregistrer les modifications et obtenir le même résultat en utilisant des appels cURL bruts. Nous abordons également les fonctionnalités clés, les options de configuration et les considérations de performance pour vous aider à intégrer l&rsquo;édition d&rsquo;Excel de manière efficace.</p>
<h2 id="modifier-un-fichier-excel-dans-nodejs-via-rest---guide-en-5-étapes">Modifier un fichier Excel dans Node.js via REST - Guide en 5 étapes</h2>
<ol>
<li><strong>Installez le SDK et configurez les informations d&rsquo;identification</strong> : Définissez votre <code>CLIENT_ID</code> et <code>CLIENT_SECRET</code> afin que la bibliothèque puisse s&rsquo;authentifier auprès de GroupDocs Cloud.</li>
</ol>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">CLIENT_ID</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;YOUR_CLIENT_ID&#34;</span>;
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">CLIENT_SECRET</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;YOUR_CLIENT_SECRET&#34;</span>;
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">config</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsEditorCloud</span>.<span style="color:#a6e22e">Configuration</span>(<span style="color:#a6e22e">CLIENT_ID</span>, <span style="color:#a6e22e">CLIENT_SECRET</span>);
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">editApi</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsEditorCloud</span>.<span style="color:#a6e22e">EditApi</span>(<span style="color:#a6e22e">config</span>);
</span></span></code></pre></div><ol start="2">
<li><strong>Charger le classeur Excel pour l&rsquo;édition</strong> : Utilisez <code>EditDocumentRequest</code> pour ouvrir le fichier stocké dans votre stockage cloud.</li>
</ol>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">editRequest</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsEditorCloud</span>.<span style="color:#a6e22e">EditDocumentRequest</span>({
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">fileInfo</span><span style="color:#f92672">:</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsEditorCloud</span>.<span style="color:#a6e22e">FileInfo</span>({ <span style="color:#a6e22e">filePath</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;input.xlsx&#34;</span> })
</span></span><span style="display:flex;"><span>});
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">editResult</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">await</span> <span style="color:#a6e22e">editApi</span>.<span style="color:#a6e22e">editDocument</span>(<span style="color:#a6e22e">editRequest</span>);
</span></span></code></pre></div><ol start="3">
<li><strong>Récupérer la première feuille de calcul et localiser la cellule cible</strong> : Le SDK renvoie un objet <code>document</code> qui contient des feuilles de calcul et des cellules.</li>
</ol>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">worksheet</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">editResult</span>.document.<span style="color:#a6e22e">worksheets</span>[<span style="color:#ae81ff">0</span>];
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">let</span> <span style="color:#a6e22e">targetCell</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">worksheet</span>.<span style="color:#a6e22e">cells</span>.<span style="color:#a6e22e">find</span>(<span style="color:#a6e22e">c</span> =&gt; <span style="color:#a6e22e">c</span>.<span style="color:#a6e22e">rowIndex</span> <span style="color:#f92672">===</span> <span style="color:#ae81ff">0</span> <span style="color:#f92672">&amp;&amp;</span> <span style="color:#a6e22e">c</span>.<span style="color:#a6e22e">columnIndex</span> <span style="color:#f92672">===</span> <span style="color:#ae81ff">0</span>);
</span></span></code></pre></div><ol start="4">
<li><strong>Mettre à jour ou créer la valeur de la cellule</strong> : Modifiez le contenu de la cellule <strong>A1</strong> (ou ajoutez‑le s’il n’existe pas).</li>
</ol>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">if</span> (<span style="color:#f92672">!</span><span style="color:#a6e22e">targetCell</span>) {
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">targetCell</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsEditorCloud</span>.<span style="color:#a6e22e">Cell</span>({
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">rowIndex</span><span style="color:#f92672">:</span> <span style="color:#ae81ff">0</span>,
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">columnIndex</span><span style="color:#f92672">:</span> <span style="color:#ae81ff">0</span>,
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">value</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;Edited via GroupDocs Editor Cloud&#34;</span>
</span></span><span style="display:flex;"><span>    });
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">worksheet</span>.<span style="color:#a6e22e">cells</span>.<span style="color:#a6e22e">push</span>(<span style="color:#a6e22e">targetCell</span>);
</span></span><span style="display:flex;"><span>} <span style="color:#66d9ef">else</span> {
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">targetCell</span>.<span style="color:#a6e22e">value</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;Edited via GroupDocs Editor Cloud&#34;</span>;
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><ol start="5">
<li><strong>Enregistrez le classeur modifié dans le stockage</strong> : Fournissez un <code>outputPath</code> et appelez <code>saveDocument</code>.</li>
</ol>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">saveOptions</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsEditorCloud</span>.<span style="color:#a6e22e">SaveOptions</span>({ <span style="color:#a6e22e">outputPath</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;output.xlsx&#34;</span> });
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">saveRequest</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsEditorCloud</span>.<span style="color:#a6e22e">SaveDocumentRequest</span>({
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">documentId</span><span style="color:#f92672">:</span> <span style="color:#a6e22e">editResult</span>.<span style="color:#a6e22e">documentId</span>,
</span></span><span style="display:flex;"><span>    document<span style="color:#f92672">:</span> <span style="color:#a6e22e">editResult</span>.document,
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">saveOptions</span><span style="color:#f92672">:</span> <span style="color:#a6e22e">saveOptions</span>
</span></span><span style="display:flex;"><span>});
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">await</span> <span style="color:#a6e22e">editApi</span>.<span style="color:#a6e22e">saveDocument</span>(<span style="color:#a6e22e">saveRequest</span>);
</span></span></code></pre></div><p>Pour une liste complète des classes et des méthodes, consultez la <a href="https://reference.groupdocs.cloud/editor/">référence API</a>.</p>
<h2 id="modifier-un-fichier-excel-dans-nodejs-via-rest---exemple-de-code-complet">Modifier un fichier Excel dans Node.js via REST - Exemple de code complet</h2>
<p>L&rsquo;exemple suivant montre comment modifier un fichier Excel dans Node.js via REST en utilisant GroupDocs.Editor Cloud SDK.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">GroupDocsEditorCloud</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">require</span>(<span style="color:#e6db74">&#34;@groupdocs/editor-cloud&#34;</span>);
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// Replace with your actual GroupDocs Cloud credentials
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">CLIENT_ID</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;YOUR_CLIENT_ID&#34;</span>;
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">CLIENT_SECRET</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;YOUR_CLIENT_SECRET&#34;</span>;
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// Paths for the source Excel file and the edited result
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">INPUT_FILE_PATH</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;input.xlsx&#34;</span>;
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">OUTPUT_FILE_PATH</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;output.xlsx&#34;</span>;
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">async</span> <span style="color:#66d9ef">function</span> <span style="color:#a6e22e">editExcel</span>() {
</span></span><span style="display:flex;"><span>    <span style="color:#75715e">// Configure the SDK
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>    <span style="color:#66d9ef">const</span> <span style="color:#a6e22e">config</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsEditorCloud</span>.<span style="color:#a6e22e">Configuration</span>(<span style="color:#a6e22e">CLIENT_ID</span>, <span style="color:#a6e22e">CLIENT_SECRET</span>);
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">const</span> <span style="color:#a6e22e">editApi</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsEditorCloud</span>.<span style="color:#a6e22e">EditApi</span>(<span style="color:#a6e22e">config</span>);
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// 1. Load the Excel workbook for editing
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>    <span style="color:#66d9ef">const</span> <span style="color:#a6e22e">editRequest</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsEditorCloud</span>.<span style="color:#a6e22e">EditDocumentRequest</span>({
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">fileInfo</span><span style="color:#f92672">:</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsEditorCloud</span>.<span style="color:#a6e22e">FileInfo</span>({
</span></span><span style="display:flex;"><span>            <span style="color:#a6e22e">filePath</span><span style="color:#f92672">:</span> <span style="color:#a6e22e">INPUT_FILE_PATH</span>
</span></span><span style="display:flex;"><span>        })
</span></span><span style="display:flex;"><span>    });
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">editResult</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">await</span> <span style="color:#a6e22e">editApi</span>.<span style="color:#a6e22e">editDocument</span>(<span style="color:#a6e22e">editRequest</span>);
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">const</span> <span style="color:#a6e22e">documentId</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">editResult</span>.<span style="color:#a6e22e">documentId</span>;
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">const</span> document <span style="color:#f92672">=</span> <span style="color:#a6e22e">editResult</span>.document;
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// 2. Retrieve the first worksheet
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>    <span style="color:#66d9ef">const</span> <span style="color:#a6e22e">worksheet</span> <span style="color:#f92672">=</span> document.<span style="color:#a6e22e">worksheets</span>[<span style="color:#ae81ff">0</span>];
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// 3. Update cell A1 (rowIndex = 0, columnIndex = 0) with a new value
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>    <span style="color:#66d9ef">let</span> <span style="color:#a6e22e">targetCell</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">worksheet</span>.<span style="color:#a6e22e">cells</span>.<span style="color:#a6e22e">find</span>(<span style="color:#a6e22e">c</span> =&gt; <span style="color:#a6e22e">c</span>.<span style="color:#a6e22e">rowIndex</span> <span style="color:#f92672">===</span> <span style="color:#ae81ff">0</span> <span style="color:#f92672">&amp;&amp;</span> <span style="color:#a6e22e">c</span>.<span style="color:#a6e22e">columnIndex</span> <span style="color:#f92672">===</span> <span style="color:#ae81ff">0</span>);
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> (<span style="color:#f92672">!</span><span style="color:#a6e22e">targetCell</span>) {
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">targetCell</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsEditorCloud</span>.<span style="color:#a6e22e">Cell</span>({
</span></span><span style="display:flex;"><span>            <span style="color:#a6e22e">rowIndex</span><span style="color:#f92672">:</span> <span style="color:#ae81ff">0</span>,
</span></span><span style="display:flex;"><span>            <span style="color:#a6e22e">columnIndex</span><span style="color:#f92672">:</span> <span style="color:#ae81ff">0</span>,
</span></span><span style="display:flex;"><span>            <span style="color:#a6e22e">value</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;Edited via GroupDocs Editor Cloud&#34;</span>
</span></span><span style="display:flex;"><span>        });
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">worksheet</span>.<span style="color:#a6e22e">cells</span>.<span style="color:#a6e22e">push</span>(<span style="color:#a6e22e">targetCell</span>);
</span></span><span style="display:flex;"><span>    } <span style="color:#66d9ef">else</span> {
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">targetCell</span>.<span style="color:#a6e22e">value</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;Edited via GroupDocs Editor Cloud&#34;</span>;
</span></span><span style="display:flex;"><span>    }
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// 4. Save the edited workbook back to storage
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>    <span style="color:#66d9ef">const</span> <span style="color:#a6e22e">saveOptions</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsEditorCloud</span>.<span style="color:#a6e22e">SaveOptions</span>({
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">outputPath</span><span style="color:#f92672">:</span> <span style="color:#a6e22e">OUTPUT_FILE_PATH</span>
</span></span><span style="display:flex;"><span>    });
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">saveRequest</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsEditorCloud</span>.<span style="color:#a6e22e">SaveDocumentRequest</span>({
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">documentId</span><span style="color:#f92672">:</span> <span style="color:#a6e22e">documentId</span>,
</span></span><span style="display:flex;"><span>        document<span style="color:#f92672">:</span> document,
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">saveOptions</span><span style="color:#f92672">:</span> <span style="color:#a6e22e">saveOptions</span>
</span></span><span style="display:flex;"><span>    });
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">saveResult</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">await</span> <span style="color:#a6e22e">editApi</span>.<span style="color:#a6e22e">saveDocument</span>(<span style="color:#a6e22e">saveRequest</span>);
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">console</span>.<span style="color:#a6e22e">log</span>(<span style="color:#e6db74">`Edited file saved to: </span><span style="color:#e6db74">${</span><span style="color:#a6e22e">saveResult</span>.<span style="color:#a6e22e">path</span><span style="color:#e6db74">}</span><span style="color:#e6db74">`</span>);
</span></span><span style="display:flex;"><span>}
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">// Execute the edit operation
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#a6e22e">editExcel</span>().<span style="color:#66d9ef">catch</span>(<span style="color:#a6e22e">error</span> =&gt; {
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">console</span>.<span style="color:#a6e22e">error</span>(<span style="color:#e6db74">&#34;Error during Excel editing:&#34;</span>, <span style="color:#a6e22e">error</span>);
</span></span><span style="display:flex;"><span>});
</span></span></code></pre></div><blockquote>
<p><strong>Note :</strong> Cet exemple de code démontre la fonctionnalité principale. Avant de l&rsquo;utiliser dans votre projet, assurez-vous de mettre à jour tous les chemins de fichiers et les valeurs de configuration pour qu&rsquo;ils correspondent à votre environnement réel, vérifiez que toutes les dépendances requises sont correctement installées et testez soigneusement dans votre environnement de développement. Si vous rencontrez des problèmes, veuillez consulter la <a href="https://docs.groupdocs.cloud/editor/">documentation officielle</a> ou contacter l&rsquo;<a href="https://forum.groupdocs.cloud/c/editor/20">équipe de support</a> pour obtenir de l&rsquo;aide.</p>
</blockquote>
<h2 id="mettre-à-jour-une-feuille-xlsx-en-utilisant-lapi-rest-dans-nodejs-via-curl">Mettre à jour une feuille XLSX en utilisant l&rsquo;API REST dans Node.js via cURL</h2>
<p>Voici un guide rapide de la même opération en utilisant des appels HTTP bruts. Remplacez les valeurs de substitution par vos informations d&rsquo;identification et noms de fichiers réels.</p>
<ol>
<li><strong>Obtenir un jeton d&rsquo;accès</strong></li>
</ol>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -X POST <span style="color:#e6db74">&#34;https://api.groupdocs.cloud/v2.0/connect/token&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>        -H <span style="color:#e6db74">&#34;Content-Type: application/x-www-form-urlencoded&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>        -d <span style="color:#e6db74">&#34;client_id=YOUR_CLIENT_ID&amp;client_secret=YOUR_CLIENT_SECRET&amp;grant_type=client_credentials&#34;</span>
</span></span></code></pre></div><p>La réponse contient <code>access_token</code>.</p>
<ol start="2">
<li><strong>Téléverser le fichier XLSX source</strong></li>
</ol>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -X POST <span style="color:#e6db74">&#34;https://api.groupdocs.cloud/v2.0/storage/file/input.xlsx&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>        -H <span style="color:#e6db74">&#34;Authorization: Bearer YOUR_ACCESS_TOKEN&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>        -F <span style="color:#e6db74">&#34;file=@input.xlsx&#34;</span>
</span></span></code></pre></div><ol start="3">
<li>
<p><strong>Modifier le classeur (modifier la cellule A1)</strong></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -X POST <span style="color:#e6db74">&#34;https://api.groupdocs.cloud/v2.0/editor/edit&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -H <span style="color:#e6db74">&#34;Authorization: Bearer YOUR_ACCESS_TOKEN&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -H <span style="color:#e6db74">&#34;Content-Type: application/json&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>     -d <span style="color:#e6db74">&#39;{
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">           &#34;fileInfo&#34;: { &#34;filePath&#34;: &#34;input.xlsx&#34; },
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">           &#34;options&#34;: {
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">               &#34;cells&#34;: [
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">                   { &#34;rowIndex&#34;: 0, &#34;columnIndex&#34;: 0, &#34;value&#34;: &#34;Edited via GroupDocs Editor Cloud&#34; }
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">               ]
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">           }
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">         }&#39;</span>
</span></span></code></pre></div></li>
<li>
<p><strong>Télécharger le fichier modifié</strong></p>
</li>
</ol>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -X GET <span style="color:#e6db74">&#34;https://api.groupdocs.cloud/v2.0/storage/file/output.xlsx&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>        -H <span style="color:#e6db74">&#34;Authorization: Bearer YOUR_ACCESS_TOKEN&#34;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span>        -o output.xlsx
</span></span></code></pre></div><p>Pour plus de détails sur les charges utiles de la requête, consultez la <a href="https://reference.groupdocs.cloud/editor/">documentation officielle de l&rsquo;API</a>.</p>
<h2 id="prérequis-et-configuration-pour-groupdocseditor-cloud-sdk-for-nodejs">Prérequis et configuration pour GroupDocs.Editor Cloud SDK for Node.js</h2>
<p>Pour commencer à utiliser le SDK, vous avez besoin de Node.js 14 ou une version ultérieure et d’un compte GroupDocs Cloud.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>npm install groupdocs-editor-cloud
</span></span></code></pre></div><p>Vous pouvez également télécharger le dernier package depuis la <a href="https://releases.groupdocs.cloud/editor/nodejs/">page de publication</a>. Après l&rsquo;installation, créez un <code>client_id</code> et un <code>client_secret</code> dans votre tableau de bord GroupDocs Cloud et conservez‑les en sécurité.</p>
<h2 id="ce-qui-rend-groupdocseditor-cloud-sdk-for-nodejs-idéal-pour-modifier-les-feuilles-de-calcul-excel">Ce qui rend GroupDocs.Editor Cloud SDK for Node.js idéal pour modifier les feuilles de calcul Excel</h2>
<ul>
<li><strong>Full XLSX support</strong> - Chargez, modifiez et enregistrez les classeurs tout en préservant les formules, les styles et la validation des données.</li>
<li><strong>Cell‑level editing</strong> - Accédez aux cellules, lignes ou colonnes individuelles de manière programmatique, ce qui est idéal pour mettre à jour les rapports ou les tableaux de bord.</li>
<li><strong>Cloud storage integration</strong> - Travaillez directement avec les fichiers stockés dans GroupDocs Cloud sans les télécharger localement.</li>
<li><strong>Secure REST communication</strong> - Toutes les opérations se déroulent via HTTPS, et le SDK gère la gestion des jetons pour vous.</li>
</ul>
<p>Pour approfondir, consultez la <a href="https://docs.groupdocs.cloud/editor/">documentation</a>.</p>
<h2 id="affiner-les-options-dédition-excel-dans-groupdocseditor-cloud">Affiner les options d&rsquo;édition Excel dans GroupDocs.Editor Cloud</h2>
<p>Le SDK expose plusieurs options qui vous permettent de contrôler la façon dont le classeur modifié est enregistré.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">saveOptions</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">new</span> <span style="color:#a6e22e">GroupDocsEditorCloud</span>.<span style="color:#a6e22e">SaveOptions</span>({
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">outputPath</span><span style="color:#f92672">:</span> <span style="color:#e6db74">&#34;output.xlsx&#34;</span>,
</span></span><span style="display:flex;"><span>    <span style="color:#75715e">// You can also set compression level, password protection, etc.
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>});
</span></span></code></pre></div><ul>
<li><strong><code>outputPath</code></strong> - Chemin de destination dans le stockage cloud.</li>
<li><strong><code>compressionLevel</code></strong> - Réduire la taille du fichier pour les grands classeurs (disponible dans la référence API).</li>
<li><strong><code>password</code></strong> - Protéger le fichier résultant avec un mot de passe si nécessaire.</li>
</ul>
<p>Ajustez ces paramètres pour correspondre aux exigences de sécurité et de performance de votre projet.</p>
<h2 id="considérations-de-performance-pour-la-modification-de-classeurs-xlsx-via-rest">Considérations de performance pour la modification de classeurs XLSX via REST</h2>
<ol>
<li><strong>Réutiliser l&rsquo;objet de configuration</strong> - Créer une nouvelle <code>Configuration</code> pour chaque requête ajoute une surcharge. Conservez une instance unique pendant la durée de vie de votre application.</li>
<li><strong>Mise à jour groupée des cellules</strong> - Si vous devez modifier de nombreuses cellules, regroupez‑les dans un tableau et envoyez une seule requête de modification au lieu de plusieurs appels.</li>
<li><strong>Limiter la taille de la feuille de calcul</strong> - Les feuilles de calcul très volumineuses augmentent la consommation de mémoire. Envisagez de répartir les données sur plusieurs feuilles lorsque cela est possible.</li>
<li><strong>Éviter les sauvegardes inutiles</strong> - N&rsquo;appelez <code>saveDocument</code> qu&rsquo;après que toutes les modifications requises ont été appliquées afin de réduire les opérations d&rsquo;E/S.</li>
</ol>
<h2 id="conclusion">Conclusion</h2>
<p>Editing an Excel file in Node.js via REST becomes straightforward with the <a href="https://products.groupdocs.cloud/editor/nodejs/">GroupDocs.Editor Cloud SDK for Node.js</a>. Vous pouvez charger programmétiquement un classeur, modifier des cellules et enregistrer le résultat en utilisant seulement quelques appels d&rsquo;API ou de simples commandes cURL. L&rsquo;architecture cloud du SDK élimine le besoin d&rsquo;installations locales d&rsquo;Office et s&rsquo;adapte à la charge de travail de votre application. Pour les déploiements en production, achetez une licence adaptée à votre modèle d&rsquo;utilisation, et vous pouvez également obtenir une licence temporaire pour les tests depuis la <a href="https://purchase.groupdocs.cloud/temporary-license/">temporary license page</a>. Commencez à intégrer l&rsquo;édition Excel dès aujourd&rsquo;hui et rationalisez vos pipelines de traitement de données.</p>
<h2 id="faq">FAQ</h2>
<p><strong>Comment modifier un fichier Excel dans Node.js via REST sans écrire de code HTTP personnalisé ?</strong><br>
Utilisez le GroupDocs.Editor Cloud SDK for Node.js, qui abstrait les appels REST et vous permet de modifier un fichier Excel dans Node.js via REST avec de simples invocations de méthodes.</p>
<p><strong>Puis-je mettre à jour une feuille XLSX en utilisant l&rsquo;API REST Node.js pour les gros fichiers ?</strong><br>
Oui. Le SDK diffuse les données et prend en charge les mises à jour par lots, ce qui le rend adapté aux classeurs volumineux. Ajustez <code>compressionLevel</code> et les modifications de cellules par lots pour améliorer les performances.</p>
<p><strong>Quelle est la meilleure façon de modifier une feuille de calcul Excel de manière programmatique avec Node.js ?</strong><br>
Travaillez avec les objets <code>worksheet</code> et <code>cell</code> renvoyés par <code>editDocument</code>. Cela vous donne un contrôle complet sur les lignes, les colonnes et les valeurs des cellules sans quitter l’environnement Node.js.</p>
<p><strong>Où puis-je trouver les informations de tarification et de licence ?</strong><br>
Tous les détails de licence, y compris les niveaux de tarification et une licence temporaire pour l&rsquo;évaluation, sont disponibles sur la <a href="https://purchase.groupdocs.cloud/temporary-license/">page de licence temporaire</a>.</p>
<h2 id="en-savoir-plus">En savoir plus</h2>
<ul>
<li><a href="https://blog.groupdocs.cloud/fr/editor/edit-excel-sheet-via-rest-in-java/">Modifier une feuille Excel via REST en Java</a></li>
<li><a href="https://blog.groupdocs.cloud/fr/editor/edit-excel-sheet-using-rest-api-in-python/">Modifier une feuille Excel en utilisant l&rsquo;API REST en Python</a></li>
<li><a href="https://blog.groupdocs.cloud/fr/editor/best-practices-for-csv-editor-development-in-java/">Meilleures pratiques pour le développement d&rsquo;un éditeur CSV en Java</a></li>
</ul>
]]></content:encoded>
    </item>
    
  </channel>
</rss>
