Hello,
I am new in appian and I need to import a excel and save in local variable, after that I need to validate the content of the file (number of columns, etc), I don't how to start.
Could recommend me the function to do it,
Could you help me , please?
Best regards,
Discussion posts and replies are publicly visible
This plugin can help - https://community.appian.com/b/appmarket/posts/excel-tools
There are 3 expressions which you can use:
There is no way to do directly within the interface this AFAIK since you only have access to the file contents after the form has been submitted.
Hi anad0004, Create a process where user can upload the excel file, once file is uploaded , get the doc id of excel file. Now you would need to write an expression rule with the help of the functions(
readexcelsheetpaging()excelreadcellsbyname()excelreadcellsbynumber()
) which Mathieu has already mentioned from excel tool plugin. you can pass the excel doc id into these functions and based on your requirement you can validate the data. I hope it helps.
Thanks a lot
gopalak Do you have an example about this functions, there is not much information on the web about this and I am not sure how to implement it.
Could you help me, please?
BR
Hi, please go through the documentation from the below link,
Thank for this information
I am reading,
I have this code
primaryButtons: { a!buttonWidget( label: "Submit", submit: true, style: "PRIMARY", saveInto: a!save(readexcelsheetpaging( excelDocument:"CargaMasiva.xlsx", sheetNumber:0, pagingInfo:a!pagingInfo(1,50), ), ri!contenido) ) }
And I have this error:
The passed parameter(s) are of the wrong type. Received the type com.appiancorp.common.xml.JaxbConversionException: JAXB was not able to produce a value for typed value TypedValue[it=3,v=CargaMasiva.xlsx] as java class java.lang.Long.
To Achieve this , you would need to design a process model,
1.Design a ui to upload the excel and get the docId and configure in start form ,
2.create an expression rule and write your logic what you want to do
3. use above expression rule in a script task and based on expression rule output move forward with your process.
and use that function something like below
readexcelsheetpaging( excelDocument:ri!docId, sheetNumber:0, pagingInfo:a!pagingInfo( startIndex: 2, batchSize:3 ) )
change paging configuration based on your data and make sure not to use "-1" here as it will give you null data.
Thanks