I have a requirement where I need to upload the excel file, parse it and store in documents. I know uploading csv and parsing but the requirment is with excel upload. Anybody done this previously? or any kind of work around?

1 Answer 1


Excel files are tricky, depending on the version of Office used, if your users are using the latest version (.xlsx), you can access the contents, however if it is the older format (.xls) this is a binary format and is not parseable by Apex. Check out this blog and approach on how to upload an .xlsx file and access its contents (which are mostly XML files). The basic idea is this...

<c:unzipfile name="somezipfile" oncomplete="unzipped(state);"
  onreceive="{!$RemoteAction.UnzipDemoController.receiveZipFileEntry}" />

Then to handle the contents of the XLXS file an Apex method is defined as follows...

public static String receiveZipFileEntry(String filename, String path, String data, String state)

This is a screenshot from the blog thats shows what you can do...

enter image description here

  • Always thought it would be difficult. Thanks for the link. Dec 10, 2013 at 14:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .