Go API to clear pivot tables on local Microsoft Excel and OpenOffice Calc spreadsheet
Go Clear to clear pivot tables on local Microsoft Excel and OpenOffice Calc spreadsheet
Clear pivot tables on local Microsoft Excel and OpenOffice Calc spreadsheet - Go REST API
API Request:
POST
https://api.aspose.cloud/v3.0/cells/clear
Clearing pivot tables on local Microsoft Excel and OpenOffice Calc spreadsheet is a complex task. Clearing pivot tables on local Microsoft Excel and OpenOffice Calc spreadsheet transitions is performed by our Go SDK while maintaining the source spreadsheet's main structural and logical content. Our Go library is a professional solution to clear pivot tables on local Microsoft Excel and OpenOffice Calc spreadsheet online. This Cloud SDK gives Go developers powerful functionality and perfect API.
Go code for clearing pivot tables on local spreadsheets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"os" | |
asposecellscloud "github.com/aspose-cells-cloud/aspose-cells-cloud-go" | |
) | |
func main() { | |
instance := asposecellscloud.NewCellsApiService(os.Getenv("ProductClientId"), os.Getenv("ProductClientSecret"), "https://api.aspose.cloud", "v3.0") | |
localFolder := "testdata/" | |
book1Xlsx := "Book1.xlsx" | |
dataSourceXlsx := "datasource.xlsx" | |
objecttype := "pivottable" | |
var mapFiles map[string]string | |
mapFiles = make(map[string]string) | |
mapFiles[book1Xlsx] = localFolder + book1Xlsx | |
mapFiles[dataSourceXlsx] = localFolder + dataSourceXlsx | |
request := new(asposecellscloud.PostClearObjectsRequest) | |
request.File = mapFiles | |
request.Objecttype = objecttype | |
_, response, err := instance.PostClearObjects(request) | |
if err != nil { | |
println(err) | |
} | |
println(response.StatusCode) | |
} |
How to use Go API to clear pivot tables
- Create an account at Dashboard to get free API quota & authorization details
- Initialize CellsApi with Client Id, Client Secret, Base URL & API version
- Call PostClearObjects method to get the resultant stream
System Requirements
- go version go1.13.0 or newer