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 = "Sheet1"; int rowIndex = 1; 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 add empty row in worksheet RowResponse apiResponse = cellsApi.PutInsertWorksheetRow(fileName, sheetName, rowIndex, storage, folder); if (apiResponse != null && apiResponse.Status.Equals("OK")) { Console.WriteLine("Row Href : " + apiResponse.Row.link.Href); Console.ReadKey(); } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); } // ExEnd:1 }
public RowResponse GetRow(long id) { Row targetRow = _context.Row.Where(s => s.RowId == id).FirstOrDefault(); RowResponse row = new RowResponse() { RowId = targetRow.RowId, RowName = targetRow.RowName, SectionId = targetRow.SectionId }; return(row); }