How can read content of excel file*

cancel
Showing results for 
Search instead for 
Did you mean: 
janaka1984
Established Member II

How can read content of excel file*

Jump to solution

Hi all,

i am trying to read content (folder structure : ID and name) of excel file. i need to know how can i do in proper way?

please give me hint

Regards

Janaka

1 Solution

Accepted Solutions
jpotts
Professional

Re: How can read content of excel file*

Jump to solution

This looks like a very simple Excel file. Why not save it as a CSV and then you'll have plain text which you can read and parse easily from JavaScript.

Or better yet, express it as JSON and then you won't have to parse anything.

View solution in original post

8 Replies
mrks_js1
Established Member II

Re: How can read content of excel file*

Jump to solution

Hi Janaka

If it is concerning the content of the file, you could do a transformation to txt. (similar to this Applying rules to folders | Alfresco Documentation). 

But you need to give us a bit more info about what you are trying to do here.

janaka1984
Established Member II

Re: How can read content of excel file*

Jump to solution

Hi Markus Joos,

I have excel file which contain folder id and name. I have to read content of file and generate folder structure under document library. this is one time task

Folder Id  Folder Name

1               folder one

1.1            folder two

1.2            folder three

2               folder abc

romschn
Senior Member

Re: How can read content of excel file*

Jump to solution

You can use Apache POI API to read/write to excel files. Take a look at Apache POI – Reading and Writing Excel file in Java for reference.

Hope this helps.

janaka1984
Established Member II

Re: How can read content of excel file*

Jump to solution

Hi Ramesh,

do have any idea to read excel content using javascript api within alfresco

jego
Partner

Re: How can read content of excel file*

Jump to solution

Client side (Browser) or Server side (repository backend) JavaScript?

If serverside, please write a JavaScript rootobject to wrap the poi library. Take a Look at the alfresco-jscript-extensions in github...

If Client side, there are some JS libraries which can read the Excel File in the Browser...

Thanks

Jens

jpotts
Professional

Re: How can read content of excel file*

Jump to solution

This looks like a very simple Excel file. Why not save it as a CSV and then you'll have plain text which you can read and parse easily from JavaScript.

Or better yet, express it as JSON and then you won't have to parse anything.

janaka1984
Established Member II

Re: How can read content of excel file*

Jump to solution

Thanks Jeff .

i have used alfresco rules to convert Excel file into CSV , so i could read CSV by JS

Lino17
Partner

Re: How can read content of excel file*

Jump to solution

Hi @jpotts 

How do you express the Excel as a JSON OR

Read and parse the plaintext from JS. I am trying to do this in the Alfresco Activiti(Model Application) script task