Insert chart into Excel content pane app by using Javascript API? - office-2013

In App for Office, it support to create task pane app by using javascript/html, now i want to know how to insert chart into Excel content app by using JavaScript API.

Not sure I follow. A content app is by its nature insertable. If what you want to do is to create a chart that can bind to data (like this app: http://office.microsoft.com/en-us/store/people-graph-WA104104476.aspx?queryid=ff2c275c%2Dad40%2D4fee%2Da071%2Dd94e18b134ec&css=people%20chart&CTT=1 ) then you need to look at the binding APIs; this is a good article.
http://msdn.microsoft.com/en-us/magazine/dn166930.aspx

Related

Auto update data source in Tableau Desktop

I am trying to automatically update a .txt file-based data source in Tableau Desktop but can't find how to do it. What I want is to see a "live" chart on a worksheet not having to push F5 every time. Is there a way to do this?
No there's not.
Tableau Desktop is the editor you can use to create visualizations and it's not build to shove "live" data even though you can refresh data via F5.
You can achieve something like you want, publishing your dashboard to a Tableau Server/Online and then using some tricks.
Please check this related S.O. post:
Auto refresh Tableau online dashboard using "Auto refresh" Chrome extension

Confluence Plugin: How to create space and pages programmatically from imported CSV?

I want to add a button to the system.header/left, which I already did. And when I click that button, I want a file picker popup to choose my CSV.
From the CSV content, I want to create space and pages.
I've browsed through the documents and tutorials, but I can't find anything alike.
Could you point a direction or steps for me? At least, point me to something relevant?.
Here's a short overview:
Your button will trigger a JavaScript.
That javaScript will open a dialog window containing the form elements allowing the file upload
The target of that form will be either a servlet or rest-endpoint
inside your plugin. Let's assume it's a servlet.
The servlet will
take the submitted file, split it using the defined separator and
create the page structure using the confluence API calls.
And forward to the start page of your new Space.
I'd suggest that you start with the servlet.
Provide a couple of lines of test data, to check if your code creates the page structure as expected.
Once this works, add the file handling part (from a dedicated html) and pass the data to your existing function.
Now, you have the backend and the frontend, so rendering the dialog when your button is clicked, is pretty straight forward.
Make sure to display the button only if the current user has the right to create a space.
Stuff that might help you:
confluence servlet module: https://developer.atlassian.com/server/confluence/servlet-module/
reading a CSV in java: https://www.baeldung.com/java-csv-file-array
Uploading a file in Java: https://www.baeldung.com/upload-file-servlet
How to create a new Space using Java API: https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-create-a-Confluence-Space-with-Java-API/qaq-p/491588
Confluence API: SpaceManager: https://docs.atlassian.com/atlassian-confluence/6.6.0/index.html?com/atlassian/confluence/spaces/SpaceManager.html
Confluence API: PageManager: https://docs.atlassian.com/atlassian-confluence/6.6.0/index.html?com/atlassian/confluence/pages/PageManager.html
Hope this helps.

Tableau: can a visualization be created via javascript or other language?

I am trying to create a new visualization (sheet) in a tableau online workbook via javascript API or by another language. Not by using Tableau Desktop or "manual" interaction into Tableau Online.
I know that the JS API allows me to control (filter, display, etc.) existing visualizations, and the SDK can extract data and publish, but my need is to "create" a new visualization into an existing workbook.
Is there a way to do this?
The only methods of creating Tableau content that I'm aware of is using Tableau Desktop or Web authoring of something that is already published.
I explain how to do what you're asking on the blog post linked below. You can use Python with Jinja2.
The basics ...
Create a template of your XML.
Put in the necessary Jinja2 templating language code into your template as placeholders for the data and XML that needs to be rendered by Jinja2. You can render data conditionally as well.
Create a CSV file that specifies what the Python program needs to know to create your workbooks.
Run your Python application to generate a TWB file based on your template and input file. You can also easily create TWBX by zipping the TWB and data together.
The link gives code examples and an example CSV file for specifying your input.
https://www.linkedin.com/pulse/create-tableau-visualizations-programmatically-allan-thompson

Is there a way to create multiple pages using macro in an opensource software?

hmm it might be very complicated to achieve this. But I just would like to know if I can save time creating pages and uploading images into opensource software (PrestaShop)? I need to design a template for standard page. Then under create page option ,simply use macro to create instead of I doing them manually. same goes to uploading images but no template for them of course. Thanks in advance for any sharing.
You can create SQL INSERT INTO statements programatically that insert content directly to the database.
You can use the uploadFile method of PhantomJS to automate image uploads.

Where to change data for a "list" datasource in dashcode?

I created a new project in dashcode and it automatically generated a mobile web app for me with a list and sample datasources. I see two datasources, one is labeled as "datasource" and the other is "list". However I can see that the actual data in datasources is in a js file, everything is good but where is the actual data stored for "list"?
The sample application came with a bunch of data for "list" and I am unable to change it. Any ideas?
When you click on "DataSource" under Data Sources, you'll notice that the top line displayed is URL. It is assumed that the DataSource you'll be using is on the web somewhere (there's a way to maintain the datasource locally on the iphone but I'll get to that in a minute). So, "publish" you xml|rss|atom|etc. data on a web site somewhere and enter the appropriate URL. When you press return or hit the refresh arrow, if the URL is correct, DashCode will parse your data file and the DataSource and List items will reflect your xml structure).
Then using DashCode create the bindings between your data and your DashCode template.... I whiz right by this because there is an excellent tutorial at the apple developer website at: http://developer.apple.com/safari/library/documentation/AppleApplications/Conceptual/Dashcode_UserGuide/Contents/Resources/en.lproj/Introduction/Introduction.html#//apple_ref/doc/uid/TP40004692-CH1-SW1
If the above link fails, go to "developer.apple.com" and from that home page search for "DashCode". The intro document should be the first link returned.
This intro walks you through writing DashCode applications including working with DataSources and binding to your templates.