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.

TommyDo
  • 663
  • 8
  • 23
  • 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. – Kraang Prime Apr 15 '14 at 02: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. – mason Apr 15 '14 at 02: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 – Kraang Prime Apr 15 '14 at 02:07

3 Answers3

1

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

mason
  • 31,774
  • 10
  • 77
  • 121
  • Oh, thank you. I just want to have a answer to reply to my boss and the customer. – TommyDo Apr 15 '14 at 02:02
  • 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. – Kraang Prime Apr 15 '14 at 02:12
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.

Joseph
  • 117,725
  • 30
  • 181
  • 234
  • I agree -- also could be the client is requesting specifically HTML5 knowing that it is more capable than older markup. – Kraang Prime Apr 15 '14 at 02:03
  • 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 Apr 15 '14 at 02:05
  • @TommyDo I suggest [jqGrid](http://jqgrid.com/) for starters. All you need to do is to convert an Excel file into a format jqGrid understands. It's butter from there onwards. – Joseph Apr 15 '14 at 02:08
  • @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". – mason Apr 15 '14 at 02:09
  • @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) – Kraang Prime Apr 15 '14 at 02:10
  • @all: Thank for all. I know the structure and function of the languages. But my boss just want me to make sure the answer before I answer to the customer. I don't have enough exp for the HTML5 so I just ask for sure. – TommyDo Apr 15 '14 at 02:17
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!

Community
  • 1
  • 1
Sam
  • 2,917
  • 1
  • 15
  • 28