Sütun Detaylarını Al

Aspose Cloud’da depolanan bir Excel çalışma kitabından belirli bir çalışma sayfası sütunuyla (indeks, genişlik, stil, gizli durumu) ilgili detaylı bilgi alın.

İçindekiler

  1. Önkoşullar
  2. Kimlik Doğrulama
  3. Uç Nokta
  4. İstek Parametreleri
  5. cURL Örneği
  6. Yanıt Örneği
  7. Yanıt Şeması
  8. Olası Hatalar
  9. SDK Örnekleri
  10. Ek Kaynaklar

Önkoşullar


Kimlik Doğrulama

Tüm Aspose.Cells Cloud API’leri, JWT jeton tabanlı kimlik doğrulama kullanır. Jetonu Authorization başlığına ekleyin:

Authorization: Bearer <access_token>

Jeton alma ile ilgili ayrıntılar için kimlik doğrulama kılavuzuna bakın.


Uç Nokta

GET https://api.aspose.cloud/v4.0/cells/{name}/worksheets/{sheetName}/cells/columns/{columnIndex}

Güvenlik ve Kimlik Doğrulama

Aspose.Cells Cloud API’leri güvenlidir ve JWT jeton tabanlı kimlik doğrulama gerektirir.

Istek Parametreleri

Ad Konum Tür Gerekli Açıklama
name path string Evet Çalışma kitabının dosya adı.
sheetName path string Evet Sütunu içeren çalışma sayfası.
columnIndex path integer Evet Alınacak sütunun sıfır tabanlı indeksi.
folder query string Hayır Çalışma kitabının bulunduğu depolama klasörü.
storageName query string Hayır Depolama hizmetinin adı (örn. Aspose Cloud Depolama Alanı).

cURL Örneği

curl -X GET "https://api.aspose.cloud/v4.0/cells/test.xlsx/worksheets/Sheet1/cells/columns/0?folder=MyFolder&storageName=MyStorage" \
     -H "accept: application/json" \
     -H "Authorization: Bearer <access_token>"

Yanıt Örneği

{
  "Column": {
    "GroupLevel": 0,
    "Index": 0,
    "IsHidden": false,
    "Width": 8.5,
    "Style": {
      "link": {
        "Href": "/style",
        "Rel": "self"
      }
    },
    "link": {
      "Href": "https://api.aspose.cloud/v4.0/cells/test.xlsx/worksheets/Sheet1/cells/columns/0",
      "Rel": "self"
    }
  },
  "Code": 200,
  "Status": "OK"
}

Yanıt Şeması

Alan Tür Açıklama
Column.GroupLevel integer Sütunun özet düzeyi (gruplama için kullanılır).
Column.Index integer Sütunun sıfır tabanlı indeksi.
Column.IsHidden boolean Sütun gizliyse true, aksi halde false.
Column.Width number Sütunun genişliği karakter cinsinden.
Column.Style object Sütunun stil kaynağına bir link içerir.
Column.link object Sütun kaynağına yönelik kendi bağlantısı (self-link).
Code integer Yanıtın HTTP durum kodu.
Status string Durumun metinsel açıklaması (örn. OK).

Olası Hatalar

HTTP Durumu Kod Mesaj Ne zaman oluşur
400 400 Bad Request (Geçersiz İstek) Gerekli parametreler eksik veya hatalı.
401 401 Unauthorized (Yetkisiz) Eksik veya geçersiz Authorization başlığı.
404 404 Not Found (Bulunamadı) Çalışma kitabı, çalışma sayfası veya sütun mevcut değil.
500 500 Internal Server Error (İç Sunucu Hatası) Beklenmeyen sunucu tarafı sorunu.

Örnek – 404 Bulunamadı

{
  "Code": 404,
  "Message": "Sütun indeksi aralık dışı."
}

Örnek – 401 Yetkisiz

{
  "Code": 401,
  "Message": "Geçersiz veya eksik kimlik doğrulama jetonu."
}

SDK Örnekleri

Aşağıdaki kod parçacıkları, resmi Aspose.Cells Cloud SDK’larını kullanarak Get Worksheet Columns (Çalışma Sayfası Sütunlarını Al) işlemini çağırma yöntemini göstermektedir. Bir Gist kullanılamaz hale gelirse, örnek kod burada doğrudan verilmiştir.

**C#**
using Aspose.Cells.Cloud.SDK.Api;
using Aspose.Cells.Cloud.SDK.Model;
using System;

// API istemcisini yapılandır
var apiInstance = new CellsApi("client_id", "client_secret");

// Gerekli parametreleri ayarla
string name = "test.xlsx";
string sheetName = "Sheet1";
int columnIndex = 0;
string folder = "MyFolder";          // isteğe bağlı
string storageName = "MyStorage";    // isteğe bağlı

try
{
    var response = apiInstance.GetWorksheetColumns(name, sheetName, columnIndex, folder, storageName);
    Console.WriteLine("Sütun İndeksi: " + response.Column.Index);
    Console.WriteLine("Genişlik: " + response.Column.Width);
}
catch (Exception e)
{
    Console.WriteLine("CellsApi.GetWorksheetColumns çağrısında özel durum: " + e.Message );
}
**Java**
import com.aspose.cells.cloud.api.CellsApi;
import com.aspose.cells.cloud.model.ColumnsResponse;

public class GetWorksheetColumnsExample {
    public static void main(String[] args) {
        CellsApi apiInstance = new CellsApi("client_id", "client_secret");

        String name = "test.xlsx";
        String sheetName = "Sheet1";
        Integer columnIndex = 0;
        String folder = "MyFolder";          // isteğe bağlı
        String storageName = "MyStorage";    // isteğe bağlı

        try {
            ColumnsResponse result = apiInstance.getWorksheetColumns(name, sheetName, columnIndex, folder, storageName);
            System.out.println("Sütun indeksi: " + result.getColumn().getIndex());
            System.out.println("Genişlik: " + result.getColumn().getWidth());
        } catch (Exception e) {
            System.err.println("CellsApi#getWorksheetColumns çağrısında özel durum");
            e.printStackTrace();
        }
    }
}
**Python**
import asposecellscloudsdk
from asposecellscloudsdk import CellsApi, ApiClient, Configuration

config = Configuration()
config.client_id = "client_id"
config.client_secret = "client_secret"

api_instance = CellsApi(ApiClient(config))

name = "test.xlsx"
sheet_name = "Sheet1"
column_index = 0
folder = "MyFolder"       # isteğe bağlı
storage_name = "MyStorage"  # isteğe bağlı

try:
    response = api_instance.get_worksheet_columns(name, sheet_name, column_index, folder, storage_name)
    print("Sütun indeksi:", response.column.index)
    print("Genişlik:", response.column.width)
except Exception as e:
    print("CellsApi->get_worksheet_columns çağrısında özel durum:", e)
**Node.js (TypeScript)**
import { CellsApi, Configuration } from "@asposecloud/cells-sdk";

const config = new Configuration({
    clientId: "client_id",
    clientSecret: "client_secret"
});
const apiInstance = new CellsApi(config);

const name = "test.xlsx";
const sheetName = "Sheet1";
const columnIndex = 0;
const folder = "MyFolder";       // isteğe bağlı
const storageName = "MyStorage"; // isteğe bağlı

apiInstance.getWorksheetColumns(name, sheetName, columnIndex, folder, storageName)
    .then((result) => {
        console.log("Sütun indeksi:", result.column?.index);
        console.log("Genişlik:", result.column?.width);
    })
    .catch((error) => {
        console.error("getWorksheetColumns çağrısında hata:", error);
    });

Not: Tüm SDK’lar, client_id ve client_secret sağladığınızda otomatik olarak Authorization başlığını işlemektedir.


Ek Kaynaklar


Belge son güncelleme tarihi: 2026-07-30.