Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mert1917
Contributor III
Contributor III

Input&From

Hi everyone,

I have a question.Could you help to me please..

I have 30 excell files.It file names date format.

01.01.2018.xlsx

02.01.2018.xlsx

03.01.2018.xlsx

.....

All of the files are the same format.

x1

my target;

I want to entry startdate and enddate .How I can  fetch the sum of all files between two dates

example;

LET vstartdate=Input('startdate');

LET venddate=Input('enddate');

LOAD X1
FROM

(ooxml, embedded labels, table is Sheet1);

(?????) =What can it here syntax?


I did this but it did don't work

LET date='>='&$(=vstartdate)&'<='&$(=venddate);

Thank you.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try something like:

For Each File in FileList(vPath &'\??.??.????.xlsx')

  Let vDate = Date#(Left(File, 10), 'MM.DD.YYYY');

  If vDate >= vstartdate and vDate <= venddate Then

        <Load Statement>

  End If

Next



Note: you might have to format the input dates to convert it to proper date format.

View solution in original post

2 Replies
tresesco
MVP
MVP

Try something like:

For Each File in FileList(vPath &'\??.??.????.xlsx')

  Let vDate = Date#(Left(File, 10), 'MM.DD.YYYY');

  If vDate >= vstartdate and vDate <= venddate Then

        <Load Statement>

  End If

Next



Note: you might have to format the input dates to convert it to proper date format.

mert1917
Contributor III
Contributor III
Author

Hi Tresesco,

Thank you so much for helping to me.

I checked but syntax not working

How can i do?

regards


Set vPath = 'C:\Users\mert.sanlier\Desktop\TEST\';

LET vstartdate=Input('startdate');

LET venddate=Input('enddate');

For Each File in FileList(vPath &'\??.??.????.xlsx')

Let vDate = Date#(Left(File, 10), 'DD.MM.YYYY');

If vDate >= vstartdate and vDate <= venddate Then

LOAD X1

FROM


(
ooxml, embedded labels, table is Sheet1);

End If

Next