I am in the works of evaluating the Spreadsheet Editor.
When a user clicks a cell in a sheet, I am capturing the Sheet’s name and the Cell’s “Display Value” (from the event).
What I now attempting to do is reverse that process, where I have that list of `Sheet Name`!<Cell DisplayValue> (ie - `Sheet 1`!A13)
when someone clicks that from my list, I want to be able to activate cell A13 in Sheet 1.
I think I can figure out the row & cell index values from the Cell Display value, but I can’t see a way to get the sheet index from the sheet name (or set an active sheet using the sheet name).
is there a way to set an Active Sheet using the Sheet Name instead of the Sheet Index?
is there a way to set an Active Cell using the Display Value, rather than the row index & cell index?
Hello, I’m AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
To achieve the functionality of selecting a sheet and cell based on their names and display values, you can use the Apryse Spreadsheet Editor APIs to interact with sheets and cells programmatically.
Some things you can try:
Use the Workbook.getSheet API to retrieve a sheet by its name. This allows you to activate a sheet without needing its index.
To activate a cell using its display value, you will need to convert the display value (e.g., A13) into row and column indices. Typically, this involves translating the column letter(s) to a zero-based index and parsing the row number.
Once you have the sheet and the indices, you can set the active cell using the appropriate API calls within the Spreadsheet Editor.
Here are some resources that might help you:
Spreadsheet Editor Edit Mode: This guide shows how to interact with sheets and cells, including getting sheets by index or name.
To get the active cell using the display value, you may need to create a custom function that converts the Row (letters) to a number and Column (number-1), return those values and then call getCellAt().
Currently we do not have a set cell selection type of API however if this is something that can benefit you, I would be happy to submit a feature request! If so, we would be interested to know:
What is the workflow that you would use the requested feature in?
Why is the feature valuable to you and your users?
My call to parseRangeString returns an object that is rejected by selectCellRange. I think the selectCellRange method is doing an object type check, where parseRangeString returns an any object, even with the same properties aligning.