none
How to program something in Excel Online RRS feed

  • Question

  • Sorry for maybe stupid question, but i'm really in trouble.

    I create a new workbook in Excel Online.

    What is the way to write and execute any program, which will be operating with this workbook, using JavaScript API?

    P.S. It's not about any particular API issues, but only about WHERE and HOW to begin "programming". Thanks in advance!

    Wednesday, October 29, 2014 10:47 AM

Answers

  • Hi Oleg,

    Thanks for posting in MSDN forum.

    >>What is the way to write and execute any program, which will be operating with this workbook, using JavaScript API?<<

    Based on the description, you want to open the spreadsheet on Excel Online. The apps for Office is not used to handle this secnario. You can get more detail about apps for Office from link below:
    Overview of apps for Office

    Roadmap for Apps for Office, VSTO, and VBA

    And as far as I know, we can use Excel Object model or Excel 2013 Primary Interop Assembly Reference to open the spreadsheet from Excel Online or SharePoint. It is same with open spreadsheet on local computer, the only differece is the URL of spreadsheet. Here is a sample using Office PIAs for your reference:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.Office.Interop.Excel;
    namespace ConsoleApplication
    {
        class OpenWorkbook    
    {
            public void Main()
            {
                string fileName = @"https://d.docs.live.net/xxxxx/CreateTable.xlsm";
                Application excelApp = new Application();
                excelApp.Visible = true;
                Workbook aWorkbook = excelApp.Workbooks.Open(fileName);
                aWorkbook.Worksheets["Sheet1"].Range["A9"].Value = "11";
            }
        }
    }
    

    To use the Excel PIAs, we need to add the reference to Microsoft.Office.Interop.Excel.dll. You can get more detail about Excel PIAs form link below:

    Welcome to the Excel 2013 Primary Interop Assembly Reference

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, October 30, 2014 3:10 AM
    Moderator