4

I want to validate some of the data of an excel file from browser.

I can achieve it by the following,

Save excel in temporary notes document and extract into server hard disk/ Shared path and I can validate the excel.

My question is,

Is there any way to read the excel data without saving in notes document/ Server hard disk?

For me saving into notes document is not a major concern, I do not want to keep the data on server hard disk/ any shared folder. So

Is there any way to read the excel data from notes attachment without extracting into server hard disk/ Shared folder?

Note: I do not want to use any external library/third party tool for achieving this,

Thanks in advance!!!

Ramkumar
  • 874
  • 11
  • 27

1 Answers1

2

One option is to move the validation / processing to the client-side. Then just submit the data if it is valid, or alternatively just submit the data you want to the server.

This SO Q&A has details of a javascript-based XLS parser: How to parse Excel file in Javascript/HTML5

Alternatively, if the Excel file is simply a CSV, you could use other javascript libraries to parse the file on the client-side.

The key is the FileReader object in javascript, which is available on Chrome, Firefox, and IE 10 and above, allows you to upload a file and read it in memory in JavaScript.

Community
  • 1
  • 1
Ken Pespisa
  • 21,989
  • 3
  • 55
  • 63
  • I guess that this also requires external javascript library and sad part is, some of our application is very old and compatible only on IE8. – Ramkumar Jun 01 '16 at 05:28