I am currently developing an automation, in which an xls File has to be processed. The issue is as follows:
A column in the file contains values like ‘23,55’, ‘6,23’ etc.
As soon as the Excel Application Scope opens the file, the Cell Format changes from Standard to Number. As a result, the values change from ‘23,55’ to ‘2.355’, ‘6,23’ to ‘623’ etc.
The decimal separator (Comma) dissapears and the value changes with the format, too. The dot in this case is a thousands separator.
If I read the range of the file, I also get ‘2.355’ as an output, instead of ‘23,55’
Opening the file manually after stopping the Excel Applicaiton Scope acitivity, returns the format back to standard and subsequently, the value changes back to ‘23,55’
What I want to do is, processing the file without changing any format or values. There is a preserve format option for activities like read range, but I did not find a similar option for Excel Applicaiton Scope.
Changing Cultureinfo to de-De did not help either
How could I solve the problem?
Thank you all in advance
please set a breakpoint after read range
debug the file and get paused
open immediate panel and type in: YourDataTableVar.Rows(0).ItemArray
Share the result from immediate panel with us. Also take a screenshot from the formula content and the excel cell of the excel for the first row / relevant column.
Based on this inspection we can check for further suggestions
I solved it by using workbook activities. But now, another issue occured.
I want to write certain data into another excel file. The datatype of the data to write is double. But whenever I try to write it per Write Cell Activity into the file, the data changes from “23500,756” into “23500756,00”. Writing numbers with two decimal places like “23455,23” is working fine. But as soon as I write a double with more than 2 decimal places, excel changes the data.
Btw: The excel file is an xlsm. Therefore, I can not use Workbook activities
@kadir.kilincarslan Please check whether its properly formated in the excel. And before to writing you can use Format value to keep the format as required.