Its sorted now,
only issue is how can I save the data of multiple PDF file which is extracting the specific data in different excel sheet with the same name as PDF is having in that particular folder? @lakshman @Palaniyappan
Hi @Rahulsinha
Try this workflow. The pdfs are being read from the âPDFâ folder. Replace this path with your PDF folder path. While saving the excel file type the âNewExcelFileâ value BlankProcess.zip (1.1 MB)
Fine
hope these steps would help you resolve this
âuse a ASSIGN activity and mention like this arr_Files = Directory.GetFiles(âyourfolderpathâ,â*.pdfâ)
where arr_files is a variable of type array of string
ânow pass this variable as input to FOR EACH activity and change the type argument as string in the property panel
âinside the loop use a READ PDF or READ PDF with OCR and get the output with variable of type string or even with another method to get that particular value is fine finally storing the value in a variable of type string
âthen use a WRITE CELL activity to mention the specific value obtained from pdf to the excel or use ADD DATA ROW activity if we have other values to be mentioned in the datatable by passing that value to ARRAY ROW variable like this {âvalue1â,âvalue2â,âŚ,âvaluenâ}
then while mentioning the sheet name in write range or write cell activity mention like this Path.GetFileNameWithoutExtension(item.tostring).ToString
I have created already the Workflow but I have issue on: only issue is how can I save the data of multiple PDF file which is extracting the specific data in different excel sheet with the same name as PDF is having in that particular folder?
As in the folder there will be different PDF files,it should read one and create the excel file with the same name as it is mention for PDF file and again it repeats the same for other existing PDF file
Yah this would get on your requirements buddy
But in addition to above we can include BUILD DATATABLE activity at the very beginning of the workflow that is before the ASSIGN activity with array of string
Kindly let me know what i need to do here and also what I need to mention is the built data table as in the body I have updated it with string.
How it can be helpful to create different Excel sheet based on multiple PDF.
Do you mean I should add Build data table before ForEach activity. If yes then what input I need to give and how it will be creating different excel sheet based on the PDF.
Fine
âfirst Build datatable activity and get the output as dt
âthen For each loop with that expression as input
âinside the loop use READ PDF and get the output and string manipulation to get that value
ânow use add Datarow with that value and datatable as dt
âthen in Append range with sheet name as Path.GetFileNameWithoutExtension(item.tostring).ToString
âfinally inside the loop use clear datatable activity with input as dt
This will delete the last appended data and for next loop fresh datatable will be sent for filling data
Thanks buddy. I tried with it and I am just able to read and write one PDF file but when it is reading the second PDF file from the folder and trying to write it in excel I am getting the below error.
While writing for the first PDF there is no error, the above is for the second file when it is reading and there are 5 more PDF file which need to be read and write in excel
Got it
If we use append range we must have that mentioned sheet already
Else
If itâs a new sheet then use WRITE RANGE activity and mention that sheetname and datatable as input and also enable add headers property
I am not able to understand like in append range it is creating Test.xlsx and also reading PDF and wring it in excel with the Sheet name same as PDF File name and it is reading for two file but while repeating third time I am getting the error as Append Range: Range does not exist.
Can you please guide me on how to solve that query so it can read all the PDF files and write in the same way in an excel. using append range
No, it is not the datatable varisble is Finaldt, but with that also I am unable to run the query, I am trying to real all the PDF file existing in the folder and write it in one excel sheet with different sheet name as [er the pdf file name.
As of now with the help of append range I am able to read PDF and write it in Excel (Test.xlsx) with two different sheet name but for the third time I am getting an error