Excel'den CS'ye
Bu REST API saveas
excel dosyasını CSV’ye.
POST /cells/{name}/saveAs API, MS Excel dosyasını ek ayarlarla CSV dosyası olarak kaydetmenizi ve sonucu depolamaya kaydetmenizi sağlar.
Bu REST API convert
excel dosyasını CSV’ye.
PUT /hücreler/dönüştür API, MS Excel dosyasını ek ayarlarla CSV dosyasına dönüştürmenizi ve sonucu yanıta kaydetmenizi sağlar.
Bu REST API export
excel dosyasını CSV’ye.
GET /hücreler/{isim} API, MS Excel dosyasını ek ayarlarla CSV dosyasına dönüştürmenizi ve sonucu yanıta kaydetmenizi sağlar.
DİNLENME API
API
Tip
Tanım
Havalı Bağlantı
/hücreler/dönüştür
KOYMAK
Çalışma kitabını istek içeriğinden bir biçime dönüştürür
PutConvertWorkBook
/hücreler/{isim}
ELDE ETMEK
Çalışma kitabını başka bir biçime dışa aktarır.
GetWorkBook
/cells/{name}/saveAs
POSTALAMAK
Çalışma kitabını Biçime Aktar
Belge SonrasıKaydet
Bu API’ler, herkesin erişebileceği bir programlama arabirimi tanımlar ve REST etkileşimlerini doğrudan bir web tarayıcısından gerçekleştirmenize olanak tanır.
KullanabilirsinizcURL Aspose.Cells web hizmetlerine kolayca erişmek için komut satırı aracı. Aşağıdaki örnek, cURL ile Cloud API’e nasıl çağrı yapılacağını gösterir.
Bulut SDK Ailesi
Bir SDK kullanmak, geliştirmeyi hızlandırmanın en iyi yoludur. Bir SDK, alt düzey ayrıntılarla ilgilenir ve proje görevlerinize odaklanmanızı sağlar. Lütfen kontrol edinGitHub deposu Aspose.Cells Bulut SDK’larının tam listesi için.
Aşağıdaki kod örnekleri, çeşitli SDK’lar kullanılarak Aspose.Cells web hizmetlerine nasıl çağrı yapılacağını gösterir:
C#
// For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-dotnet/
Aspose . Cells . Cloud . SDK . Api . CellsApi cellsApi = new CellsApi ( "your client id" , "your client secret" );
var response = cellsApi . CellsWorkbookPutConvertWorkbook ( File . OpenRead ( @".\TestData\datasource.xlsx" ), "csv" , null , null );
Assert . IsInstanceOf < System . IO . Stream >( response , "response is System.IO.Stream" );
Java
// For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-java/
try {
LightCellsApi liteApi = new LightCellsApi ( System . getenv ( "CellsCloudTestClientId" ), System . getenv ( "CellsCloudTestClientSecret" ));
String AssemblyTestXlsx = "assemblytest.xlsx" ;
String DataSourceXlsx = "datasource.xlsx" ;
HashMap < String , File > fileMap = new HashMap < String , File >();
fileMap . put ( AssemblyTestXlsx , new File ( "TestData\\" + AssemblyTestXlsx ));
fileMap . put ( DataSourceXlsx , new File ( "TestData\\" + DataSourceXlsx ) );
FilesResult response = liteApi . postExport ( fileMap , "workbook" , "csv" );
} catch ( ApiException e ) {
e . printStackTrace ();
}
//2. solution
try {
CellsApi api = new CellsApi ( System . getenv ( "CellsCloudTestClientId" ), System . getenv ( "CellsCloudTestClientSecret" ));
File response = api . cellsWorkbookPutConvertWorkbook (
new File ( "TestData\\Book1.xlsx" ), "csv" , null , null );
} catch ( ApiException e ) {
e . printStackTrace ();
}
Go
LightCellsAPI := NewLightCellsApiService ( clientId , clientSecret )
var fileMap map [ string ] string
fileMap = make ( map [ string ] string )
fileMap [ "Book1.xlsx" ] = "TestData\\Book1.xlsx"
fileMap [ "Book2.xlsx" ] = "TestData\\Book2.xlsx"
postOpts := new ( PostExportOpts )
postOpts . Format = "csv"
postOpts . ObjectType = "workbook"
_ , httpResponse , err := LightCellsAPI . PostExport ( fileMap , postOpts )
if err != nil {
t . Error ( err )
} else if httpResponse . StatusCode < 200 || httpResponse . StatusCode > 299 {
t . Fail ()
} else {
fmt . Printf ( "\tTestCellsPostExport \n" )
}
CellsAPI := NewCellsApiService ( clientId , clientSecret )
args := new ( CellsWorkbookPutConvertWorkbookOpts )
args . Format = "csv"
file , err := os . Open ( "TestData\\Book1.xlsx" )
if err != nil {
return
}
localVarReturnValue , httpResponse , err := CellsAPI . CellsWorkbookPutConvertWorkbook ( file , args )
if err != nil {
t . Error ( err )
} else if httpResponse . StatusCode < 200 || httpResponse . StatusCode > 299 {
t . Fail ()
} else {
fmt . Printf ( "\t TestCellsPutConvertWorkbook - %d\n" , httpResponse . StatusCode )
}