Skip to Content

SAP IRPA - Problems with date formatting when copying from Excel

Hello, I am currently working on a process that reads data from an Excel and later inserts the values into the appropriate fields of a SAP transaction.

However, the following problem occurs. Due to a custom format the "get" and "insert" function is not simply copying the string. Instead the values had been changed during the activity. As a consequence the required format is not met anymore.The cell formating of the excel file is set as it is and cannot be changed.


Here is a cell from the Excel file:

(DD.MM.YYYY HH:MM:SS)

Here's what I see in the log:

The same problem occurs with a number divided by a comma e.g. "1,3", which is saved with a dot (1.3) and then no longer matches the required formatting for the transaction as well.

Is there an option to copy and paste the values in a way that they match the string displayed in the excel file?

Thank you for your help!

Best regards

Karl

5momc.jpeg (2.1 kB)
v4lax.jpeg (2.4 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jul 16, 2020 at 02:00 PM

    Hello Karl,

    I had an similar issue.

    Please try following:

    1. Open the Excel and mark the column with the date

    2. Click on 'Daten' and afterwards on 'Text in Spalten'

    3. Go to the step 3 of 3 in the textconverter-assistant and change from Standard to Text.

    4. Try it now.


    unbenannt.png (1.6 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 24, 2020 at 08:27 PM

    Hallo Karl,

    If I am correct, you are using German Excel version. IRPA is working with US version of Excel which I believe is the reason for this behaviour.

    I don't have a solution how to fix this but possibly a workaround:

    When opening your excel file including the Date or the number in the German format p.E. "1,3", use the get one value activity and store this value in a variable. Next open another lets call it "Help-File" and use the set one value activity and set in A1 the previously saved variable. In that help-file make sure to put in formula =text(A1) in field B1 by default. Now use the get one value activity to store the value in B1 as a string. Now the string should remain as 1,3 and should not change to 1.3.

    Hope this works.

    Kind regards,

    Raphael

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.