Excel JavaScript API Update

>>Hello everyone, and welcome
to Microsoft Build 2018. My name is Juan Balmori, and I’m a Program Manager in
the Office platform team and specifically of the
Excel JavaScript API. During the next 10 minutes, I’m going to show you
a few updates here in this area. But first of all, Let’s
start with some context. So, Office Add-ins
are ways that you could actually extend
Office application using web technologies. By doing so you can actually
make them available in multiple platforms were
Office works that is Windows, iOS and Line and Mac of course. Office Add-ins are
composed of HTML page or your web application
and manifest file. So, manifest file indicates how your application is going
to behave within Office, if it’s going to be hosted within Excel or within PowerPoint
or within Word. And of course,
provide information [inaudible] where
the web application is located. So it gets activated when needed within
the office experience. When you’re done
creating your Add-ins, you can actually publish them or distribute them
through our store, or you could actually
deploy internally in your company within Enterprise by using the Office
365 administration and centralized deployment. This is an important feature
because you can actually distribute Add-ins
to specific users or groups within
your organization, you just get it through
an IT-driven delivery process. Now, the important part in the content of
these presentations is the JavaScript API we have. So the web applications
can actually use this JavaScript API
to communicate with the workbook and then
you can actually provide interactivity with
the content of the documents. So what’s included in the API, this is a project that we’ve
been doing since 2015. Since then, we have
actually released seven reports we call requirement sets or groups
of functionalities. And the last one that we are announcing
actually today is that actually 1.7 GA. We want to see more details in
a second of what’s included there and we also want to
say that we have new APIs in preview that you can
actually use today. And please, we encourage you to help us by using them and tell us
what you think about it. We have more events
there we’re going to see a few demos
here and you’re going to create
workbooks in search and finally insert
pictures into Excel. You’re going to be able to also create Pivots we
are going to support these continuous rages using the RS object as well as more and more
enhancements in charts. So 1.7 again, it’s an interesting
release because it has literally hundreds of new APIs and you can actually use with your solutions and in different feature areas
that we’ve been hearing feedback
that you guys need. So we’re trying to deliver that and unlock
potential opportunities. So with chart’s today, you can actually
have trend lines, add or remove series and we give access to the axis so that you can choose
the units of the chart, titles and all the [inaudible]
that surrounds the chart such as the title and
the label data sets. Of course, we are providing
a super important aspect for Office development
which is styles. So now, you have access
to built-in styles. But not only that, and you can also create and
apply new custom styles. You can now password protect your workbooks or worksheets, pointing capabilities
for freezing panes by rows and columns. Another highly requested feature is the custom properties, we are enabling
developers to store some incremented metadata that is stored with the document
by using custom properties. You are actually allowing developers to copy worksheets
within the Workbook and other formatting
capabilities such as changing the color of a tab or turn the grid lines
on and off, things that you can use
to improve your Add-ins. Another very aggressive
investment we made in the model. I want to start exposing
more events for the API. We are starting with
the most commonly requested such as adding
activation of worksheets. We are are adding these events in different scopes within
the applications to avoid having
[inaudible] solutions. If you’re interested in a particular worksheet that
you want to receive events, you can not do it or you can do it the entire
worksheet collection. Not only activated or deactivated but when they are added or they are changed or a selection happens within a worksheet
or within a table. Finally, Excel 1.7 APIs includes a lot of features
around getting ranges. So, we try to finish many of the properties or
members of the range objects. So, getting active cells, refreshing data
connections, getting a workbook name and many more. Again, these are hundreds of APIs that you can
actually use today. Let’s do a quick demo of this, of the few of the API
that we have today. So again, this demos, I’m going be doing
them with Script Lab. Script Lab, for those
of you who don’t know, it’s an Add-in that was
developed by my team, that enables you
to not only learn, it’s mostly to learn and
share code snippets. It’s a very cool product that you can actually
embrace, to use it. For example, here
are some samples that are shipped
with the product. And by the way, this
is in the stores. You can actually download
it from the store. Very quick example here, check out how you can use charts. So, Script Lab actually
shows you the code that it has here and you can see that we have access
to the charts collection, getting items and you
can get access to the axis that are in this chart. So if I run these
sample code here-. And again, all the samples
that you’ll see here, work in all the platforms. So I’m trying it on Windows, but nothing prevents you
from doing it online, IOS and other platform
that support. So basically, we’re going
to start here while you are adding some sample data. And as you can see-. Then we are going to get the axis units. It should be displayed
in the thousands. Change units, so you can
adjust the units of the chart. Though many other things. Okay. So this is one sample. There are other samples
associated with charts, just adding Trend lines. Let’s refresh this example here and run it, so you can see. Let’s add some, and maybe need
this worksheets from here. And the new one up
some sample data. The trend line, which
you can see here. And not only that, you can actually get it and get more information about it. So charts, getting
a bunch of charts and control over what
happens in that chart. So the next example is about using and creating
custom styles. So lets-. I have some code here that you can actually see that we have a styles collection and
you can actually create a new style by adding the properties that
have come from a style. So basically, what I’m going to do here is that I’m
going to create a new style within this document. Then I’m going to have
some sample data here, which I create a new style, and you can see that kind
of apply it here to create this orientation here. But I can go back to
our build-in style. I can get the properties of
it, align my properties. So basically, this is
a very powerful way of not only using pre-existing
styles but also adding your
own and using them. Other examples that I
want to show you here, it’s around charts,
[inaudible] of charts. Here, you can see that-. Let’s move this example here. I can import some data. These are some of
the API that are in Preview and then you can actually start by
adding a new chart. These is things that
you can actually do, you can actually change a format. Let me move this chart here. I can show the data labels
ere high then change the color of the chart,
clear the chart. This are again APIs that you
can actually that you could actually use in our preview. This API, it’s about this is
very good example as well. Here, you’re going to
see how many charts, like chart capabilities
that are on Preview. So I’m going to add
some data here, this are just some sales
in the market, some sample data from different items that
are in the store. Check it out this are all
things that you can do, so you can actually
create a line chart here using two series of data. You can actually
split the charts, you can split them into multiple charts and
then they can adjust the axis has needed so that it reflects better the information. I can actually format it, I can add secondary
axis’s it’s in a format. Then I can do fun things for
example or type analysis, so just cell changes I can provide this type of
taking steps with charts see the difference
between some of certain products
and certain dates. I can actually do other types
of analyses for example, analyzing that temperature
and those dates. Once you can see here that
we have scattered charts, support and you can also based on leaflets [inaudible]. But anyways thee are so of the APIs that are in
Preview today that we ask you to please help us give us
feedback about those. I have another example that
I want to show you lastly, because it allows you to bring in some very interesting scenarios. This is actually the create work PI these is an API
we are offering the application object that
you can actually use to create or open
an existing Workbook. I’m just getting a sample
here opens the Picker, then I can actually
select the file, and the file basically
it’s going to get open. We can use these
provided templates; Template types of solutions. So that was you just
a glimpse of what you can do. I encourage it to go to
a Web site and use other APIs. Finally I want to share with
you that we are not only investing on APIs but we are also investing on the
performance of those APIs. This business is data
driven and customer driven and just to
give you an idea of what we are doing here we are improving some of the most
common synergy in Excel, such as for example
inserting data. You can see here that we insert more than a hundred
thousand cells we’re getting a 50 percent
improvement in performance. So in general we’re improving
the performance it’s a permanent effort and you
will do not expect nothing but quality from where we’re
with their shipping here. You can find some examples
and GitHub about how we can improve performance as
well as recommendations, that we are giving you to have more performer
Add-ins from. Such as minimizing
the number of syc that you have in the API
only log properties that you need and
so on and so forth. So with that there was really a glimpse of
what about included in 1.7 I play with new things
that are coming, and I also shared
some Perf Improvements that we are doing in the platform. If you want to get
more information about this please go to dev.office.com. Don’t forget to ask us for
requesting our features in Uservoice channel and if
you have questions you can also choose Stack overflow
with a tag office-js. Thank you very much for listening and have
a great conference.


Add a Comment

Your email address will not be published. Required fields are marked *