Creer un fichier excel en javascript

lililalalulu Messages postés 2 Date d'inscription mardi 18 mai 2010 Statut Membre Dernière intervention 26 mai 2010 - 26 mai 2010 à 10:47
jdmcreator Messages postés 647 Date d'inscription samedi 30 décembre 2000 Statut Membre Dernière intervention 20 juillet 2012 - 29 mai 2010 à 22:49
Bonjour

Je voulais savoir s'il est possible de faire une fonction javascript pour creer un fichier excel.
Si cela est possible veuillez me donnez des tutos ou des bout de code qui pourrai maider

merci

1 réponse

jdmcreator Messages postés 647 Date d'inscription samedi 30 décembre 2000 Statut Membre Dernière intervention 20 juillet 2012 7
29 mai 2010 à 22:49
Ich.....

À ce que je croyais, ce n'est pas possible mais Javascript nous réserve parfois des surprises !

Voici ce que j'ai trouvé :
// Declare the variables
var Excel, Book;

// Create the Excel application object.  Excel = new ActiveXObject("Excel.Application");

// Make Excel visible.  Excel.Visible = true;

// Create a new work book.  Book = Excel.Workbooks.Add()

// Place some text in the first cell of the sheet.  Book.ActiveSheet.Cells(1,1).Value = "This is column A, row 1";

// Save the sheet.  Book.SaveAs("C:\\TEST.XLS");

// Close Excel with the Quit method on the Application object.  Excel.Application.Quit();  


Problème : Compatible IE seulement



JDMCreator
--------
Participez au nouveau projet : la wiki sur le javascript !
0
Rejoignez-nous