Split Worksheets of an Excel Workbook to TIFF or PNG Formats in Cloud

This technical tip shows how developers can split worksheets of an Excel workbook to a separate workbook, TIFF, PNG or any supported image format in the cloud. This example allows you to split all or specific worksheets of a workbook file and save each worksheet as a new workbook, TIFF or any supported image format using Aspose.Cells for Cloud API in your applications. You can use our REST API with any language: .NET, Java, PHP, Ruby, Rails, Python, jQuery and many more. Some of the code samples are provided for the above languages.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//your code here...
//Please take a look over the following code snippet for Split all Worksheets to PNGs
AsposeApp::$appSID = "77******-1***-4***-a***-80**********"
AsposeApp::$appKey = "********************************";
AsposeApp::$outPutLocation = getcwd() . "/Output/";
//build URI to split 
$strURI = 'http://api.aspose.com/v1.1/cells/Sample.xlsx/split?format=png'
//sign URI
$signedURI = Utils::sign($strURI);
$responseStream = Utils::processCommand($signedURI"POST""""");
$json = json_decode($responseStream);
//iterate through each document in the result to find output files
foreach ($json->Result->Documents as $splitSheet) { 
    $splitFileName = basename($splitSheet->link->Href);
    
    //build URI to download split worksheets
    $strURI = 'http://api.aspose.com/v1.1/storage/file/' . $splitFileName;
    
    //sign URI
    $signedURI = Utils::Sign($strURI);
    $responseStream = Utils::processCommand($signedURI"GET""""");
    //save split slides
    $outputFile = SaasposeApp::$OutPutLocation . $splitFileName;
    Utils::saveFile($responseStream$outputFile);
}
//Split selected worksheets to TIFFs 
 
AsposeApp::$appSID = "77******-1***-4***-a***-80**********"
AsposeApp::$appKey = "********************************";
AsposeApp::$outPutLocation = getcwd() . "/Output/";
//build URI to split 
$strURI = 'http://api.aspose.com/v1.1/cells/Sample.xlsx/split?from=1&to=2&format=tiff'
//sign URI
$signedURI = Utils::sign($strURI);
$responseStream = Utils::processCommand($signedURI"POST""""");
$json = json_decode($responseStream);
X

Url: http://www.aspose.com/cloud/excel-api.aspx

Language: PHP | User: Sheraz Khan | Created: Feb 12, 2014 | Tags: Split Excel Workbooks in cloud, Worksheets of Workbook, all worksheets to PNGs, selected TIFFs, worksheet PNG, Working with Workbook cloud PNGs TIFFs PNG REST API