public void Cells_Hypelinks_Tests()
        {
            try
            {
                storageService.File.CopyFile(Utils.CloudStorage_Input_Folder + "/cells-sample.xlsx", Utils.CloudStorage_Output_Folder + "/cells-sample.xlsx");

                HyperlinksResponse     hyperlinksResponse     = cellsService.Hypelinks.GetWorksheetHyperlinks(name, "sheet1", Utils.CloudStorage_Output_Folder);
                CellsHyperlinkResponse cellsHyperlinkResponse = cellsService.Hypelinks.GetWorksheetHyperlinkByIndex(name, "sheet1", 0, Utils.CloudStorage_Output_Folder);

                CellsHyperlinkResponse cellsHyperlinkResponse2 = cellsService.Hypelinks.AddWorksheetHyperlink(name, "sheet1", 0, 0, 5, 5, "http://www.aspose.com", Utils.CloudStorage_Output_Folder);

                cellsHyperlinkResponse2.Hyperlink.TextToDisplay = "Aspose";

                CellsHyperlinkResponse cellsHyperlinkResponse3 = cellsService.Hypelinks.UpdateWorksheetHyperlinkByIndex(name, "sheet1", 0, cellsHyperlinkResponse2.Hyperlink, Utils.CloudStorage_Output_Folder);

                cellsService.Hypelinks.DeleteWorksheetHyperlinkByIndex(name, "sheet1", 0, Utils.CloudStorage_Output_Folder);
                cellsService.Hypelinks.DeleteAllHyperlinksInWorksheet(name, "sheet1", 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);
            }
        }
        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";

            CellsHyperlinkResponse apiResponse = Common.CellsService.Hypelinks.GetWorksheetHyperlinkByIndex(input, sheetName, 0, Common.FOLDER, storage: Common.STORAGE);

            Console.WriteLine(" Response Picture: " + apiResponse.Hyperlink.Address.ToString());
        }
Exemple #3
0
        static void Main()
        {
            string dataDir = Common.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

            string input  = "sample1.xlsx";
            string output = "output.xlsx";

            Common.StorageService.File.UploadFile(dataDir + input, input, storage: Common.STORAGE);

            string sheetName = "Sheet1";

            CellsHyperlinkResponse cellsHyperlinkResponse = Common.CellsService.Hypelinks.GetWorksheetHyperlinkByIndex(input, sheetName, 0, Common.FOLDER, storage: Common.STORAGE);

            cellsHyperlinkResponse.Hyperlink.TextToDisplay = "Aspose";
            CellsHyperlinkResponse apiResponse = Common.CellsService.Hypelinks.UpdateWorksheetHyperlinkByIndex(input, sheetName, 0, cellsHyperlinkResponse.Hyperlink, Common.FOLDER, storage: Common.STORAGE);

            Common.StorageService.File.DownloadFile(input, dataDir + output, storage: Common.STORAGE);
        }