on 04-07-2016 10:35 AM
Hi,
I want to load one or more Excel files from a folder into a table. The files could be of .xls or .xlsx extension.
So, in the file format, I need to specify the file name for taking both .xls and .xlsx files only for loading.
Currently I'm specifying it using wildcard as *.xls* . But, is there any other way so that i can keep it more specific.
Can we use regular expressions other than the basic wild cards here? Expecting your valuable suggestions.
Thanks,
Dav
if it is only xls and xlsx files you are getting in that specific folder location, then you can even use *.*. This is a risky option because if you have any other file in that folder, Data Services will try to read it too.
The option from Dirk will be ideal for specific files.
If you don't want to hard code the pattern, you can use parameter by either declaring a variable or substitution parameter.
kind regards
Raghu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Better to use a Global Variable like
# Set the default path to be used for target file VBAK
$G_File_Name='/usr/test/sap/VBAK*.xlsx'
Initialize the above global variable so that you dont need to manually enter the file name with extension.
Regards
Arun Sasi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can combine wildcards and commas. E.g.:
VBAK*.xlsx,VBAK*.xls
will process files as VBAK20160401.xlsx, VBAK20160402.xls, VBAK20160403.xls... together in one run.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.