Получите AlternativeText с Javascript API для Office - PullRequest
0 голосов
/ 27 ноября 2018

Как получить Alt Text таблицы в office-word.

enter image description here

Я нашел решение на языке C # как показано ниже:

using Spire.Doc;

namespace Add_Alt_Text_To_Word_Table
{
    class Program
    {
        static void Main(string[] args)
        {
            //Instantiate a Document object
            Document doc = new Document();
            //Load a word document
            doc.LoadFromFile("Input.docx");

            //Get the first section
            Section section = doc.Sections[0];

            //Get the first table in the section
            Table table = section.Tables[0] as Table;

            //Add alt text

            //Add tile
            table.Title = "Table 1";
            //Add description
            table.TableDescription = "Description Text";

            //Save the document
            doc.SaveToFile("output.docx", FileFormat.Docx2013);            
        }
    }
}

Итак, как это сделать с помощью JavaScript Api для Office

...