I am developing an Excel Add-In that extracts the text of cell A1 INCLUDING its format and display the text in its own area. So the add in contains this (see screenshot below): • Area to display the formatted text • Button to start the extraction Please Click to view image
bellow is the code that i am using to get the text
function displaySelectedCells() {
Office.context.document.getSelectedDataAsync(Office.CoercionType.Text,
function (result) {
if (result.status === Office.AsyncResultStatus.Succeeded) {
showNotification('The selected text is:', '"' + result.value + '"');
} else {
showNotification('Error', result.error.message);
}
});
}
The above code is using "CoercionType" as "Text" . I have tried a lot to find the solution to get the text as formatted written in a Sheet Cell. The Response i am getting is plane text only :( Please help me to solve the probelm