Пример #1
0
        public static void Run()
        {
            // ExStart:1
            CellsApi   cellsApi   = new CellsApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);
            StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH);

            String fileName   = "Sample_Test_Book.xls";
            String sheetName  = "Sheet5";
            int    chartIndex = 0;
            String storage    = "";
            String folder     = "";

            try
            {
                // Upload source file to aspose cloud storage
                storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName));

                // Invoke Aspose.Cells Cloud SDK API to get fill format of chart area from worksheet
                FillFormatResponse apiResponse = cellsApi.GetChartAreaFillFormat(fileName, sheetName, chartIndex, storage, folder);

                if (apiResponse != null && apiResponse.Status.Equals("OK"))
                {
                    FillFormat chartAreaFillFormat = apiResponse.FillFormat;
                    Console.WriteLine("ChatArea FillFormat Type :: " + chartAreaFillFormat.Type);
                    Console.ReadKey();
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace);
            }
            // ExEnd:1
        }
 public void Cells_ChartArea_Tests()
 {
     try
     {
         ChartAreaResponse  chartAreaResponse  = cellsService.ChartArea.GetChartAreaInfo(name, "sheet4", 0, Utils.CloudStorage_Input_Folder);
         LineResponse       lineResponse       = cellsService.ChartArea.GetChartAreaBorderInfo(name, "sheet4", 0, Utils.CloudStorage_Input_Folder);
         FillFormatResponse fillFormatResponse = cellsService.ChartArea.GetChartAreaFillFormatInfo(name, "sheet4", 0, Utils.CloudStorage_Input_Folder);
     }
     catch (Exception ex)
     {
         Assert.Fail(ex.Message);
     }
 }
Пример #3
0
        static void Main()
        {
            string dataDir = Common.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

            string input = "sample1.xlsx";

            Common.StorageService.File.UploadFile(dataDir + input, input, storage: Common.STORAGE);
            string sheetName = "Sheet1";

            FillFormatResponse apiResponse = Common.CellsService.ChartArea.GetChartAreaFillFormatInfo(input, sheetName, 0, Common.FOLDER, storage: Common.STORAGE);

            Console.WriteLine(" Response Fill: " + apiResponse.FillFormat.Type.GetType());
        }