How to create a xls file in enyojs

edited March 2014 in Newbie Questions
Hi Experts,
I am very new to enyojs and I have to create a excel file and have used the following code to create but It is not getting created. Request you to suggest me how to do?
var Excel, Book;	// Declare the variables
    	Excel = new ActiveXObject("Excel.Application");	// Create the Excel application object.
    	Excel.Visible = true;	// Make Excel invisible.
    	var WorkBook = Excel.Workbooks.Add();	// Create a new work book.
    	var Sheet = WorkBook.ActiveSheet;
    	WorkBook.SaveAs("D:/Test/xyz.xls");		
    	Excel.Quit();	// Close Excel with the Quit method on the Application object.
With regards
R e h a n

Comments

  • This is outside the scope of Enyo -- this is all ActiveX and you'll probably get a lot more help on a MSDN forum.
  • edited March 2014
    I do understand, this is out of Enyoj scope but I am using enyoj javascript framework so there should be some way to craet xls file using enyoj.

    With regarads
    R e h a n
  • edited April 2014
    Are there any suggestions or clues available for how to implement the creation of even a *.txt file using Enyo? I would like to find a way to create a txt/doc or pdf file and email it. I know there is a cordova plugin to create and send an email but I've not managed to find anything about how to integrate or insert the result of a local db query into the email or create some kind of file to attach to the email once I get the cordova plugin functioning.

    Any clues about how to build such a bridge?

    EDIT:
    Would some adaptation of HTML5 like this work?
    function SaveDatFileBro(localstorage) {
      localstorage.root.getFile("info.txt", {create: true}, function(DatFile) {
        DatFile.createWriter(function(DatContent) {
          var blob = new Blob(["Lorem Ipsum"], {type: "text/plain"});
          DatContent.write(blob);
        });
      });
    }
Sign In or Register to comment.