0

I have the project and the ticket is "Read the file.xlsx (Excel) on server" but the customer ask to use the HTML5 to apply this task.

As I knew, HTML5 is the client language, it makes template, form...etc. But cause the HTML5 is very new with me, I don't understand all the new attributes so this task makes me confused. Can anybody give me the answer for this.

3
  • If you wanted to rewrite the way the server processes and delivers HTML, you could, or perhaps a hack compile of Lynx with some redirected output to a stream handler --- but it is much easier to simply use PHP for server side stuff, and deliver HTML5 to the client. Commented Apr 15, 2014 at 2:01
  • @SanuelJackson That's like saying I could use my computer's fans to make a smoothie. While I'm sure if I reconfigured my computer I could grind some ice, but it's so remote a possibility that I shouldn't even mention it. Commented Apr 15, 2014 at 2:04
  • @mason - Sort of. There may be some very real programming exercise where this would be a requirement (some bosses are funny that way). Just reassuring that anything is possible when it comes to writing code -- it's all in how creative and ingenious you are in solving the problem. I love the analogy to smoothies -- this is more like using your cd-tray as a coffee holder -- why would you ?? even though you can ! If a customer ever asked me to do that, i would try to educate - that failing - i would disown them. lol Commented Apr 15, 2014 at 2:07

3 Answers 3

1

Hope the answers given by people before me helped to demystify your belief that you could use HTML5 as a server side language, which is not a server side language but a powerful markup language. But, client side markup/scripting languages (HTML5, JQuery, Ajax etc) have come a long way that you could now do SOME of the tasks you'd do at server side at client side. But, with the use of some external libraries (They could be open source or commercial). The main disadvantage is your dependency to these libraries.

Here are few options if you (or your Boss) decide to use only HTML5 to do the task at hand.

http://codetheory.in/parse-read-excel-files-xls-xlsx-javascript/ http://blog.teamtreehouse.com/reading-files-using-the-html5-filereader-api

And, read the answer here at SO.

Cheers!

Sign up to request clarification or add additional context in comments.

Comments

1

No. HTML5 is not a programming language. It's a markup language. You can use JavaScript however.

2 Comments

Oh, thank you. I just want to have a answer to reply to my boss and the customer.
By javascript, what mason is saying, is using a server that runs javascript server side (sort of like JSP) --- newfangled tech = node.js, or angular.js, etc. node.js is the main one.
1

What your ticket most likely meant was to parse the Excel file, and display it on the client-side using HTML. And by mentioning HTML5, it most likely meant that you are free to use modern APIs rather than restrict yourself to older APIs in support for older browsers.

You can parse Excel with the server-side language of your choice and convert the data structure into a suitable format for rendering on the client-side using HTML. I also suggest you look for frameworks that allow spread-sheet like functionality, like jqGrid.

Also, before diving into the project, I suggest you clear things up with your client what that directive actually meant. Clients aren't usually techy, and it's up to you to translate their requirements into project specifications.

6 Comments

I agree -- also could be the client is requesting specifically HTML5 knowing that it is more capable than older markup.
I thought like that, but It's very complicatied. My task is "some how you make me read the xls file (the file is on the server) but have to use HTML5 >"<
@TommyDo I suggest jqGrid for starters. All you need to do is to convert an Excel file into a format jqGrid understands. It's butter from there onwards.
@TommyDo You really need to clear things up with the client before you start doing anything. And it helps not to ask silly questions like "Can I use HTML5 as a server side language".
@TommyDo - Can either start looking for a new job --- or ... use PHP to load the file, .htaccess with mod_rewrite to '.html', and spit out the contents in HTML5 format. HTML5 is basically like writing HTML, but much simpler (and more logical)
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.