locked
Consume OData Feed from LightSwitch WebApp programmatically RRS feed

  • Question

  • Hello,

    i have build a LightSwitch HTML App and want other employees in my company to be able to work with the data.

    So i thought it would be great if they can "export" the data to excel or csv. I found many options for that, but i am not a developer so i have issues in programming. I know it is possible to easily use power query from excel itself and consume the data over odata feed.

    So my question is if it is possible and when how, to export the data from lightswitch automatically to excel with a button or something like that? So that the employees not have to open excel and import the data them self?

    Or are there better possibilities you know that can export the data to the users desktop over a button?

    Thanks for your help in advance and kind regards,

    AHLEONIT

    Tuesday, December 13, 2016 3:36 PM

Answers

  • Hello, such functionality is not present OOB in the HTML Client so you should build it yourself (let's say client side: ajax call, server side OpenXml or Syncfusion.XlsIO mixed with a web api controller).

    It's not difficult but not being a developer I think going the excel route would be a lot easier.

    You should prepare for your users something like a tailored excel template with Power Query and/or a Power Pivot data model or taking a look at Power BI Desktop designer (and/or Power BI online).


    Marco

    • Marked as answer by AHleonIT Wednesday, December 14, 2016 8:57 AM
    Tuesday, December 13, 2016 7:03 PM

All replies

  • Hello, such functionality is not present OOB in the HTML Client so you should build it yourself (let's say client side: ajax call, server side OpenXml or Syncfusion.XlsIO mixed with a web api controller).

    It's not difficult but not being a developer I think going the excel route would be a lot easier.

    You should prepare for your users something like a tailored excel template with Power Query and/or a Power Pivot data model or taking a look at Power BI Desktop designer (and/or Power BI online).


    Marco

    • Marked as answer by AHleonIT Wednesday, December 14, 2016 8:57 AM
    Tuesday, December 13, 2016 7:03 PM
  • Hi AhieonIT,

    you can use this as an example. For Excel it's the same. It's a Blog entry from Elizabeth Maher showing this for Word.

    Kind regards

    Thomas


    • Edited by Thomas Steen Wednesday, December 14, 2016 3:30 PM Extended
    Wednesday, December 14, 2016 3:30 PM
  • Beth shows consuming LightSwitch odata with Excel in this old blog.

    https://blogs.msdn.microsoft.com/bethmassi/2012/03/09/creating-and-consuming-lightswitch-odata-services/

    HTH,

    Josh

    • Edited by joshbooker Thursday, December 15, 2016 3:28 AM
    Wednesday, December 14, 2016 6:00 PM