public CellsService(string appSid, string appKey) : base(appSid, appKey) { AppSid = appSid; AppKey = appKey; WorksheetColumns = new CellsWorksheetColumn(AppSid, AppKey); Autoshapes = new CellsAutoshape(AppSid, AppKey); BarCodes = new CellsBarCode(AppSid, AppKey); ChartArea = new CellsChartArea(AppSid, AppKey); Charts = new CellsChart(AppSid, AppKey); Hypelinks = new CellsHypelink(AppSid, AppKey); OleObjects = new CellsOleObject(AppSid, AppKey); Pictures = new CellsPicture(AppSid, AppKey); Properties = new CellsProperties(AppSid, AppKey); SaveAs = new CellsSaveAs(AppSid, AppKey); Workbook = new CellsWorkbook(AppSid, AppKey); Worksheets = new CellsWorksheet(AppSid, AppKey); WorksheetValidations = new CellsWorksheetValidation(AppSid, AppKey); PivotTable = new CellsPivotTable(AppSid, AppKey); }
public void Cells_OleObjects_Tests() { try { storageService.File.CopyFile(Utils.CloudStorage_Input_Folder + "/cells-sample.xlsx", Utils.CloudStorage_Output_Folder + "/cells-sample.xlsx"); CellsOleObjectsResponse cellsOleObjectsResponse = cellsService.OleObjects.GetWorksheetOleObjectsInfo(name, "Sheet5", Utils.CloudStorage_Output_Folder); CellsOleObjectResponse cellsOleObjectResponse2 = cellsService.OleObjects.GetOleObjectInfo(name, "sheet5", 0, Utils.CloudStorage_Output_Folder); CellsOleObject cellsOleObject = new CellsOleObject(); cellsOleObject.SourceFullName = Utils.CloudStorage_Input_Folder + "/doc-sample.doc"; cellsOleObject.ImageSourceFullName = Utils.CloudStorage_Output_Folder + "/signature.jpg"; cellsOleObject.UpperLeftRow = 10; cellsOleObject.UpperLeftColumn = 10; cellsOleObject.Top = 10; cellsOleObject.Left = 20; cellsOleObject.Height = 20; cellsOleObject.Width = 20; CellsOleObjectResponse CellsOleObjectResponse3 = cellsService.OleObjects.AddOleObject(name, "sheet5", 1, 1, 200, 200, string.Empty, string.Empty, cellsOleObject, Utils.CloudStorage_Output_Folder); cellsService.OleObjects.UpdateOleObject(name, "sheet5", 0, cellsOleObject, Utils.CloudStorage_Output_Folder); cellsService.OleObjects.GetTheOleObjectInSomeFormat(name, "sheet5", 0, CellsOleObjectFormat.Gif, Utils.Local_Output_Path + "cells-ole-out.gif", Utils.CloudStorage_Output_Folder); cellsService.OleObjects.DeleteOleObject(name, "sheet5", 0, Utils.CloudStorage_Output_Folder); cellsService.OleObjects.DeleteAllOleObjects(name, "sheet5", Utils.CloudStorage_Output_Folder); //storageService.File.DownloadFile(Utils.CloudStorage_Output_Folder + "/cells-sample.xlsx", Utils.Local_Output_Path + "/cells-sample.xlsx"); } catch (Exception ex) { Assert.Fail(ex.Message); } }