Javascript API for Office: How Can I Manually Trigger MS Office's AutoFormat Functionality? -


Background:

I'm building a web application within MS Excel JavaScript for office Using APIs. A functionality I am adding to the app has the ability to edit data from the app. This sends data to the API in the API via the setDataAsync function, it works for plain text.

If I enter an email address in a strange'm running into a problem when I manually from a cell with an email address, Excel Auto him a mailto: in the Hyperlink This does not happen when I set the data with javascript. I need to remove a way to force Excel to auto-format.

I have an alternative idea that has already created the data in a link itself, using it:

  = hyperlink ("mailto: person @ website. However, when looking at a manual cell, they will see that only the address instead of the long formula  
   Function writeData (bindingID, newData, line, column) {var newTable = New: and reading it back in the web app will be a nightmare  

current code. Office.TableData (); NewTable.rows = [[New data]]; Office.select ( "Binding #" + bindingID) .setDataAsync (newTable, {coercionType: "Table", startRow: line, startColumn: col}, function (asyncResult) {if (asyncResult.status == "failed") {Display ( "error: '+ asyncResult.error.message);}}};}

Q :?

is it possible to excel due to automatic format < / p>

Answer: it can not be done.

I have MS Forum this question Also asked, and got an answer in which I will post here in case anyone else has the same problem

After testing and research, I'm afraid JavaScript does not have any method or property in the office, which will automatically send mail-to-link set check

we need to format again manually cell after putting together the SetDataAsync method

Luna Zhang - .. MSFT


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -