You need to sign in to do that
Don't have an account?
Honey
How I can read xls file with apex class
Hi,
I have written one email service through which I am attaching one xls file into record's attachment. I am able to read file if it is in .csv format but unable to read if it's in .xls format. Any idea how I can convert .xls to ,csv.
Thanks in advance.
You cannot convert an XLS to a CSV file in Apex Code. The file is in a pure binary format that is not well documented. Similarly, you won't be able to read an XLSX file, despite being well documented, because it is effectively a ZIP file, so you'd have to try and decompress it in memory, which would require far too many script statements for files larger than a few kilobytes.
Edit: This sounds awfully bleak, I realize. However, if you're *determined* to do this, you might consider writing a service in .NET or something that can interface with Excel directly, and then call that service from Apex Code. You'll be limited in file size, but it would be far better than the measly limits in place in Apex Code.
Hi,
Thanks for quick respone!
Is there any way to convert it into json or xml through http call or any other api call.
with Regards
Honey