Comments (4)
@kevishi , could you please take a look?
from office-js.
Hi @FelipeCostaGualberto, in this scenario, what would you expect the right behavior to be?
We don't yet support get selected table/chart/or other objects.
We did add getActiveCell API in the newer release (still in beta). https://github.com/OfficeDev/office-js-docs/blob/ExcelJs_OpenSpec/reference/excel/workbook.md#getactivecell
Would that help?
from office-js.
I need a macro to easily color the background of my selection, be it a Range or a TextBox. VBA demonstration:
Sub ColorSelection()
Const FILL_COLOR = 6299648
Select Case TypeName(Selection)
Case "Range"
Selection.Interior.Color = FILL_COLOR
Case "TextBox"
Selection.ShapeRange.Fill.ForeColor.RGB = FILL_COLOR
Case Else
MsgBox "Can't color this type of object: " & TypeName(Selection)
End Select
End Sub
from office-js.
Probably this is a by design issue. The name of the method is getSelectedRange
Now that we are implementing shapes, charts, etc we should consider adding a generic "getSelection()" and let the user infer whats contained. This is actively on design.
we understand the requirement, so closing the issue at this point.
from office-js.
Related Issues (20)
- Office.context.mailbox.item.getConversationIndexAsync() and Office.context.mailbox.item.getItemClassAsync() failing for new Outlook client HOT 2
- Word Addin: Return Focus to Document Body after Interaction with Taskpane HOT 3
- Office.context.mailbox.item.bcc.setAsync causes cursor to move to CC field on Mac Outlook client HOT 1
- insertWorksheetsFromBase64 does not load excel if it contains chart data HOT 6
- [Regression] RuleCollection manifest field is ignored HOT 3
- Error shown to user (and fetch call cancelled) if onAppointmentSend event execution happens when other launch event(s) are running on an appointment HOT 3
- Office.context.ui.displayDialogAsync redirecting to browser from desktop app HOT 1
- Word Addin: how to retrieve characters / text prior to cursor location HOT 1
- Marketplace: error upload manifest.xml / error al subir el manifest.xml HOT 2
- Office 365 Add-Ins are working, while they are not working in the New Outlook and Web Outlook. HOT 3
- Spam addins not working for Monthly Enterprise Channels.
- OnMessageAttachmentsChanged event doesn't work if we use "Upload and share as one drive link" when attaching local file to email HOT 2
- context.trackedObjects.add seems to not working properly HOT 2
- Excel event binding issue when using shared runtime and custom functions HOT 1
- setSignatureAsync doesn't execute or executes after 5+ mins using the outlook-set-signature example. HOT 3
- Download Text File Feature Not Working on Mac Desktop for Office Add-in HOT 5
- insertFileFromBase64() Method Not Working Properly on Office for the Web HOT 6
- context. document.insertFileFromBase64 not availabe in the latest npm package HOT 4
- Content Control insertOoxml may not preserve numbering style in Office Online HOT 4
- Styles stripped when using setSignatureAsync on Outlook Mobile HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from office-js.