Excel - Output Datatable from Filepath (Classic vs Modern)

Hello Forum Team,

In Classic design, you can use Excel application scope to convert filepath into output datatable variable easily.
However, in modern design, I don’t see the ability to do this in neither Excel Process Scope nor Use Excel File.
Does anyone have a simple solution to replicate this ability (converting filepath to output datatable) using Modern Design?

Thank you

@PPIM_RPA

Ideally either in classic or modern you can use read range to get the data and store in Datatable

For reference

image

if you want to give a specific range then Use Excel.Sheet("SheetName").Range("A1:B4")

Hope this helps

cheers

Thank you for your reply. However, I am trying a workflow where the user will use “Select File” to input the Excel File and the bot will read the sheet names and provide a dialog box asking which sheet they would like to select. Trying for a flexible bot that will work with any file (variables) vs hardcoded values

@PPIM_RPA

You can use variables there is no hardcoding needs…for sample I did hardcode but you can use variable in place of file …in place of sheetname and in place of range as well

Excel.Sheet(str_Sheetname).Range(RangeValue)

image

You can use this to get each sheetname which you can add to a list variable and pass it to dialog box and sheets can be selected and we can pass back the sheetname to the read range activity

cheers

Thank you Anil. You showed how to do it. Classic design seems more elegant and less embedded than modern in this case

1 Like

@PPIM_RPA

I agree with you…this change was made in view of studiox and giving more drag and drop functionality for non developers…but yes it is little cumbersome to use

cheers

Workflow Analyzer keeps saying the code is severely embedded and with Excel in Modern Design, easy to quickly go 5 levels deep.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.