Write integer value in excel



is it possible to write integer value to excel
for example extract generic value, parse it to int and put it into excel.


I think the easiest way around that would be to just add .ToString to the value in the write cell/range activity, excel usually recognizes it as an int when saved and opened again


From my experience, if you use an Excel Scope Write Cell or Write Range, the built-in Excel feature will automatically recognize the value as a number if there are no non-numeric characters.



infortunatly no.

i had used Excel scope and write cell: but unformtunatly i can’t do arithmetic function in the Excel sheet .


Are you trying to Write an Excel Formula? If so, I might be able to help. Most people have problems with quotations because the formula contains quotes so you need to double the quotes. If you provide the function you are trying to write, someone might be able to make a suggestion.




but it did not works, here is the work flowMain(3).xaml (14.0 KB)


It looks like you are wanting to change the values in column B and write the integer into column L
Main(3).xaml (8.8 KB)

Here I simplified what you were doing and used the row in the ForEach to find the rowNumber, and checked Add Headers.

Instead of converting the value to an integer, I just used Regex to extract all the numbers out of the value with System.Text.RegularExpressions.Regex.Replace(row(1).ToString,"[^0-9]","")

If there are no numbers, it will just be blank.

If there are problems I would need the problem Excel file and what is wrong with it to solve it.



the range did not exist


My mistake. Change dt.Rows.IndexOf(row).ToString to this:

+2 was added because IndexOf for the first row will be zero and since the first row starts on row 2, you need to add 2.