Hi Everyone.
This is my first post in the forum and forgive me if my explanation is not complete.
The situation is like this, I would like to take data(date format) from one cell in excel file A and write the date in another cell(date format) in excel file B.
What I have done
- Open excel application scope
- Read range from excel file A and return datatable value
- For each loop the data table
- Use write range to enter the row(2).tostring value to other excel file B
- value from excel file A is in date format (refer to below picture)
- value from excel file A have formula
My expectation
The date written in excel file B will be the same as date in excel file A (The date will be 2020/12/26)
Issue:
- the date written in excel file B is not same as data in excel file A
data from excel file A = 2020/12/26
data written in excel file B = 1900/01/01
- value from excel file B also in date format (refer to below picture)
Reason:
When I try to do for each loop and write line for excel file A, I found out the return value is not date but return value 1.
I have tried to search about this issue in the forum but unfortunately cannot find any solutions. Most of the issue is the date written into some number like β43704β and this number will be changed to date format if the excel column set to date format.
However, for my case, since the date is returning value as 1, thus, the date in excel file return as 1900/01/01.
Sorry I am unable to attach the excel file due to confidentiality of the company.
I have only attached the screenshot for reference.
Regards,
Azizan