Excel Çalışma Sayfasında Satırları Kopyalama v3.0

Bir çalışma sayfasından belirli tüm satırlardan veri ve biçimleri kopyalayın.


Ön Gereksinimler

# Gereksinim
1 Geçerli bir JWT belirteci. Kimlik doğrulama kılavuzuna bakınız.
2 Çalışma kitabının ({name}) seçilen klasör/depolar içinde zaten mevcut olması gerekir.
3 Hedef çalışma sayfasının ({sheetName}) çalışma kitabında mevcut olması gerekir.
4 (İsteğe bağlı) Dosya varsayılan konumda değilse klasör ve storageName bilgilerini bilmek.

Uç Nokta

POST https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/cells/rows/copy

Tüm yol parametreleri büyük/küçük harfe duyarlıdır.

Yol Parametreleri

Parametre Tür Gerekli Açıklama
name string Çalışma kitabının dosya adı (örn. test.xlsx).
sheetName string Çalışma sayfasının adı (örn. Sheet1).

Sorgu Parametreleri

Parametre Tür Gerekli Açıklama
sourceRowIndex integer Kaynak satırın sıfır tabanlı indeksi.
destinationRowIndex integer Satırların yerleştirileceği sıfır tabanlı indeks.
rowNumber integer Kopyalanacak satır sayısı.
worksheet string Çalışma sayfası tanımlayıcısı; genellikle sheetName ile aynıdır.
folder string Çalışma kitabını içeren klasörün yolu.
storageName string Depolama hizmetinin adı.

İstek Örneği (cURL)

curl -v "https://api.aspose.cloud/v3.0/cells/test.xlsx/worksheets/Sheet1/cells/rows/copy?sourceRowIndex=1&destinationRowIndex=12&rowNumber=10" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt token>"

Not
<jwt token> ifadesini, kimlik doğrulama hizmetinden elde edilen geçerli bir JWT belirteci ile değiştirin.


Başarılı Yanıt

Kod Açıklama
200 Satırlar başarıyla kopyalandı.
{
  "Code": 200,
  "Status": "OK"
}

Yanıt gövdesi CellsCloudResponse türünden bir örnektir.


Hata İşleme

HTTP Kodu Anlamı Örnek Gövde
400 Geçersiz İstek – eksik/geçersiz parametreler. { "Code": 400, "Message": "Invalid sourceRowIndex." }
401 Yetkisiz – geçersiz veya eksik JWT belirteci. { "Code": 401, "Message": "Authentication failed." }
404 Bulunamadı – çalışma kitabı veya çalışma sayfası mevcut değil. { "Code": 404, "Message": "File not found." }
500 Sunucu İç Hatası – beklenmeyen sunucu koşulu. { "Code": 500, "Message": "An unexpected error occurred." }

İşleme yönergeleri


SDK Örnekleri

Aşağıdaki kod parçacıkları, resmi Aspose.Cells Cloud SDK’larıyla Satırları Kopyala işlemini nasıl çağıracağınızı göstermektedir.

Dil Örnek
C#
Kodu göstercsharp\nusing Aspose.Cells.Cloud.SDK.Api;\nusing Aspose.Cells.Cloud.SDK.Model;\n\nvar api = new CellsApi("clientId", "clientSecret");\nawait api.PostCopyWorksheetRowsAsync(name: "test.xlsx", sheetName: "Sheet1", sourceRowIndex: 1, destinationRowIndex: 12, rowNumber: 10);\n
Java
Kodu gösterjava\nCellsApi api = new CellsApi("clientId", "clientSecret");\napi.postCopyWorksheetRows("test.xlsx", "Sheet1", 1, 12, 10, null, null, null);\n
Python
Kodu gösterpython\nfrom asposecellscloud import CellsApi\napi = CellsApi(client_id='clientId', client_secret='clientSecret')\napi.post_copy_worksheet_rows(name='test.xlsx', sheet_name='Sheet1', source_row_index=1, destination_row_index=12, row_number=10)\n
Node.js
Kodu gösterjavascript\nconst { CellsApi } = require('asposecellscloud');\nconst api = new CellsApi('clientId', 'clientSecret');\nawait api.postCopyWorksheetRows('test.xlsx', 'Sheet1', 1, 12, 10);\n
Go
Kodu göstergo\nimport \"github.com/asposecellscloud/aspose-cells-cloud-go/v3\"\napi := cells.NewCellsApiClient(\"clientId\", \"clientSecret\")\n_, err := api.PostCopyWorksheetRows(context.Background(), \"test.xlsx\", \"Sheet1\", 1, 12, 10, nil, nil, nil)\n
PHP
Kodu gösterphp\nuse Aspose\Cells\CellsApi;\n$api = new CellsApi('clientId', 'clientSecret');\n$api->postCopyWorksheetRows('test.xlsx', 'Sheet1', 1, 12, 10);\n
Ruby
Kodu gösterruby\nrequire 'aspose_cells_cloud'\napi = AsposeCellsCloud::CellsApi.new('clientId', 'clientSecret')\napi.post_copy_worksheet_rows('test.xlsx', 'Sheet1', 1, 12, 10)\n
Perl
Kodu gösterperl\nuse Aspose::Cells::CellsApi;\nmy $api = Aspose::Cells::CellsApi->new('clientId', 'clientSecret');\n$api->postCopyWorksheetRows(name => 'test.xlsx', sheetName => 'Sheet1', sourceRowIndex => 1, destinationRowIndex => 12, rowNumber => 10);\n

Tüm kaynak dosyalar Aspose‑Cells‑Cloud GitHub deposunda mevcuttur.


Ayrıntılı Bilgi


Sayfa {{DATE}} tarihinde oluşturuldu. Bu API’nin en son sürümü için OpenAPI spesifikasyonuna bakınız.