Lavorare con le righe di Excel – API Cloud di Aspose.Cells

Lavorare con le righe in un file Excel

Ultimo aggiornamento: luglio 2026

Riferimento rapido all’API per le operazioni comuni sulle righe:

Operazione Metodo HTTP Endpoint Parametri chiave
Ottieni riga GET /cells/{fileName}/worksheets/{sheetName}/rows/{rowIndex} fileName, sheetName, rowIndex
Aggiungi riga POST /cells/{fileName}/worksheets/{sheetName}/rows rowIndex, height
Copia righe POST /cells/{fileName}/worksheets/{sheetName}/rows/copy sourceIndex, destinationIndex, rowCount
Elimina riga DELETE /cells/{fileName}/worksheets/{sheetName}/rows/{rowIndex} fileName, sheetName, rowIndex
Nascondi righe POST /cells/{fileName}/worksheets/{sheetName}/rows/hide startIndex, endIndex
Mostra righe POST /cells/{fileName}/worksheets/{sheetName}/rows/unhide startIndex, endIndex
Raggruppa righe POST /cells/{fileName}/worksheets/{sheetName}/rows/group startIndex, endIndex
Scindere raggruppamento righe POST /cells/{fileName}/worksheets/{sheetName}/rows/ungroup startIndex, endIndex

Dettagli richiesta / risposta

  • Ottieni riga
    Richiesta: Nessun corpo richiesto.
    Risposta (200):

    {
      "RowIndex": 5,
      "Height": 15.0,
      "IsHidden": false,
      "Style": { ... }
    }
    

    Errori: 400 Bad Request (indice non valido), 404 Not Found (file o foglio mancante).

  • Aggiungi riga
    Corpo richiesta (JSON):

    {
      "RowIndex": 10,
      "Height": 20.0
    }
    

    Risposta (201):

    { "Code": "Success", "Status": "Row added", "RowIndex": 10 }
    

    Errori: 400 Bad Request (parametri mancanti o non validi), 401 Unauthorized.

  • Copia righe
    Corpo richiesta (JSON):

    {
      "SourceIndex": 2,
      "DestinationIndex": 8,
      "RowCount": 3
    }
    

    Risposta (200):

    { "Code": "Success", "Status": "Rows copied" }
    

    Errori: 400 Bad Request, 404 Not Found.

  • Elimina riga
    Richiesta: Nessun corpo.
    Risposta (200):

    { "Code": "Success", "Status": "Row deleted", "RowIndex": 7 }
    

    Errori: 400 Bad Request, 404 Not Found.

  • Nascondi righe
    Corpo richiesta (JSON):

    { "StartIndex": 3, "EndIndex": 5 }
    

    Risposta (200): { "Code": "Success", "Status": "Rows hidden" }
    Errori: 400 Bad Request.

  • Mostra righe – stesso payload di Nascondi righe; risposta identica, stato “Rows unhidden”.

  • Raggruppa righe – stesso payload di Nascondi righe; stato della risposta “Rows grouped”.

  • Scindere raggruppamento righe – stesso payload di Nascondi righe; stato della risposta “Rows ungrouped”.

Tutte le operazioni richiedono un token di accesso OAuth 2.0/JWT valido e una versione dell’SDK appropriata.