Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Read excel from Acrobat Javascript


Level 2


Our requirement is to upload an excel from pdf form, parse it and display it in table format.

I could get the excel through upload button and the code is given below :

var myDoc =;

myDoc.importDataObject({cName: sFile });

var rstr = myDoc.getDataObjectContents(sFile);

var vFile = util.stringFromStream(rstr, "utf-8");  

But when i print vFile variable value, it is throwing some junk characters.

Please help me in getting the excel data from particular sheet in excel.



0 Replies


Level 10

Well, the data is still base64 encoded and needs to be decoded first.

Here's an example form you can start with.


Level 2

Hi radzmar,

Thanks for reply.

Still Iam unable to parse the excel file. my vFile returns "PF". Does it mean that data is base 64 encoded?

kindly help me in resolving this issue.