Folks,
I can't seem to figure out how to extract the original file name of an Excel workbook that a user selects. After selecting the appropriate file as shown below, the actual file name I get is the worksheet name (sheet 1), not the original file name (test_data.xls). I'm ultimately trying to rename the originally selected excel file and need the file name, not the opened worksheet name, to accomplish this. Any ideas how I can accomplish this?
dt = Open(
Pick File( "Select Excel File", "$dir_rawdata/", {"All Files|*"}, ),
Worksheets( "1" ),
Use for all sheets( 1 ),
Concatenate Worksheets( 0 ),
Create Concatenation Column( 0 ),
Worksheet Settings(
1,
Has Column Headers( 1 ),
Number of Rows in Headers( 3 ),
Headers Start on Row( 1 ),
Data Starts on Row( 4 ),
Data Starts on Column( 1 ),
Data Ends on Row( 0 ),
Data Ends on Column( 0 ),
Replicated Spanned Rows( 1 ),
Suppress Hidden Rows( 1 ),
Suppress Hidden Columns( 1 ),
Suppress Empty Columns( 1 ),
Treat as Hierarchy( 0 )
)
);
fname.old = dt << Get Name;