Exporting information to Excel

Exporting information to Excel

by Vijay N -
Number of replies: 17

Hi All,

This appears to be a php development task I am after but if there are contributed plugins that fully or partially what I am after, then that would great as well.

So here is what I am after:

1) A Simple page which lets user fill out a form with details about the courses they have signed up for on the moodle platform (1.9).

2) When they click the submit form, the information is transfered to an excel sheet which is layed out properly (so the excel sheet is not generated by the php files or what ever method used, but the path to the excel is already defined on the server. - the reason being that we need the excel in properly layed out format. - so may be defining the values of the columns in an existing excel sheet fromt he php files or html.

 

Thanks in advance.

V

Average of ratings: -
In reply to Vijay N

Re: Exporting information to Excel

by Vijay N -

Hi All,

Moodle 1.9

I have a bit more clarity, I am provided with an excel sheet with different worksheets that contain forms in it. I recon a series of html files needs to be created - or web page instances on moodle with the ability to transfer all this content on to the existing worksheets within the excel spreadsheet. I get that you can create page in 

 

any ideas here please?

Thank you

Vijay

In reply to Vijay N

Re: Exporting information to Excel

by Vijay N -

ok Guys,

So I decided to do some initial development research, my idea here is to get the above working is to use the "course format" as a base and start building a course page type hence letting you create these pages with . 

What are your thoughts here...

 

V

In reply to Vijay N

Re: Exporting information to Excel

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Vijay,

Maybe one reason why you are not getting replies from the Moodle community is that it is not quite clear what you are wanting to achieve.

To me it is not clear what kind of "details about courses etc." the students are supposed to fill in in your form. Why not use one of the "survey-like" plugins available in Moodle: Feedback or Questionnaire?

Joseph

In reply to Joseph Rézeau

Re: Exporting information to Excel

by Vijay N -

Hi Joseph,

 

Thanks for replying. The plugins like survey or feedback are great tools for "front end" user experience. What I am really looking for is a way to utilise my existing spreadsheet. This means that the information you enter on the moodle site gets transfered automatically to my spreadsheet.

The spreadsheet is already populated with data in a structured format. So I am looking for information entered on the moodle site to automatically populate the cell values in my spreadsheet.

 

 

Hope this information helps?

Let me know if you want more information on this.

 

Thanks in advance

Vijay

In reply to Vijay N

Re: Exporting information to Excel

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Vijay "What I am really looking for is a way to utilise my existing spreadsheet."

Maybe you are looking at the wrong end of things. However, I hope some skilled moodle programmer will be able to help you.

All the best,

Joseph

In reply to Joseph Rézeau

Re: Exporting information to Excel

by Vijay N -

Thanks Joseph,

 

I really do wish someone answers the above, this a developer's forum but I see most of the questions raised to be configuration and administration related, not many coders giving advice...

In reply to Vijay N

Re: Exporting information to Excel

by Matt Morrison -

Vijay ... Dude,


I think your best bet is to use the Feedback module, which will allow you to export to Excel. Construct the form according to your existing columns in your spreadsheet. Students can access the form whenever needed, and you don't risk losing data. Then on a scheduled basis, export the form results to an excel file. Then import your exported data into your existing spreadsheet.  That seems like the easiest and most cost effective solution.

In reply to Vijay N

Re: Exporting information to Excel

by Hubert Chathi -

I think the problem here is that you are not asking a specific question, but are asking for general input on a vague idea.  We don't know what you need help with.  Do you need to know how to create a page in Moodle?  Do you need to know what kind of plugin to use? (From your brief description, I'm guessing that an activity module or block would be more appropriate than a course format.)  Do you need to know how to interact with the Excel file?  (I doubt that many people on the forum have much experience with that, but a Google search yields some potentially helpful links.)

In reply to Hubert Chathi

Re: Exporting information to Excel

by Vijay N -

Thanks Hubert,

I came across a php extension called "PhpExcel" but ofcourse that is a php library of its own, the trick is about integrating with moodle and then doing what I am after.

I thought I made myself clear with the question, I dont have a solution in terms of which method to use - activity or block or course format plugin,  but here it is again:

1) On my excel sheet there are several pages already defined - they looks like user forms that require input. 

2) I want these forms to be in the form of web pages (html or php pages). 

3) When the user clicks on the "Submit" button in the web pages, the data then goes straight to my spreadsheet.

 

My questions:

1) Do we need to create php pages from scratch or can I use a plugin that will direct the user data from the above web pages to my excel sheet. I dont want it to go the database but instead go to my spreadsheet directly.

 

Does the above make sense? - I am not sure how much more deeper can this get - as I mentioned I don't know which plugin type to use for the above scenario and how to get it to work.?

In reply to Vijay N

Re: Exporting information to Excel

by François Gannaz -
I'm sorry, but I believe that what you want won't be easy to obtain.

1) Your form can't magically send data to an Excel file. The data has to go through PHP, and there are technical reasons that make this scenario a very bad idea. For instance, concurrent accesses when 2 students fill the form at the same time would lose data.

2) The right way would be to fetch the form data with PHP and put it in the DB. Then another PHP script would build an Excel file from this collected data. IIRC, PHPExcel can fill an existing Excel template.

3) An experienced developer would need several hours to develop this properly, using an existing activity module to build the form. For a beginner, both in PHP and Moodle, it could require weeks.

Hope that helps
In reply to François Gannaz

Re: Exporting information to Excel

by Benjamin Ellis -
Picture of Particularly helpful Moodlers

Excellent response there François, except I am not sure of point 3 since we are not quite sure what version of excel we are talking about, and whether each reponse generates a separate file etc etc. 

Vijay, I would humbly suggest you prepare a spec or get someone to work out your customer requirements and then tout for a contractor/developer (could be the same person) to 'quote' to do the work.  One thing is for sure, a PHP/Moodle beginner would struggle with this.  Obviously that is assuming you do have a budget.

Cheers

In reply to Benjamin Ellis

Re: Exporting information to Excel

by Vijay N -

Hi Framcois and Benjamin,

Thank you for your response. Now that is the type of answers I was after...smile - constructive and technical.

I like the idea of transfering data to DB and then fetching from DB to Excel.  I was actually planning to give this task to a php developer - contractor - but as you would appreciate, just because they are php developers doesn't mean they would know anything about the moodle library variables or how moodle works all together, So some guidance that I can pass onto the potential php developer would always be useful:

 

On that note, which activity would you prefer to be used to produce multiple user forms (more like the user clicks on each tab in the web page to enter different details and then click the submit form at the last tab). 

 

Thanks for this excellent information, look forward to more replies.

Vijay

In reply to Vijay N

Re: Exporting information to Excel

by Vijay N -

So  I thought the databasse activity would be a handy tool for this task, basicially along with moodle the web form it will be using Totara's pathway capability as well, - detect the pathway the student has enrolled to automatically while they fill the web form.

Does any one know how to document a development spec --- like good templates ?

Also how much do you think the above task would cost in the UK for contractors or freelancers only.

In reply to Vijay N

Re: Exporting information to Excel

by Simon Story -

Hi Vijay,
Have you considered setting the database up as an ODBC data source for excel to query? There are ODBC drivers for mysql and postgres.

Like this: http://office.microsoft.com/en-us/excel-help/use-microsoft-query-to-retrieve-external-data-HA010099664.aspx

Don't give your ODBC user permissions to update the database.

In reply to Simon Story

Re: Exporting information to Excel

by Vijay N -

Hi Simon,

 

No I haven't - not very familier with ODBC but can look into,

But I still think there will be some php scripts required as part of our requirements is to download this populated spreadsheet (with the format / template already set).

In reply to Vijay N

Re: Exporting information to Excel

by Vijay N -

ok so here is the new requirement, 

The Excel sheet should be populated and saved online on the page without downloading it. 

In reply to Vijay N

Re: Exporting information to Excel

by Bob Puffer -

Get to know "your friend", Google Spreadsheets and forms.  Secure and works really well.