I want to print serial number starting with 001 and increase as 002,003,004 like this in excel. Suggest a way to get like this.
If we read and write range in another page means it will be erased right
No, if you enter the N number of series in Sheet1 and then read the sheet1 data and write it to Sheet2, the data that we wrote into Sheet1 will remain the same; if you want to delete the data from Sheet1, use the “Delete range” activity.
Hi @Gopi_Krishna1 ,
After Reading , add a single quotation mark (') before each data in the “Column0”, you can use the following LINQ query:
(From row In Final_Dt.AsEnumerable() Let newValue = "'" & row.Field(Of String)("Column0") Select Final_Dt.Clone().Rows.Add({newValue})).CopyToDataTable()
Regards,
Vinit Mhatre
After applying this linq I am getting only column0 others columns are missing. Don’t know why.
Hi @Gopi_Krishna1 ,
To include all columns, you need to modify the LINQ query to include all columns. You can achieve this by selecting all fields in addition to "Column0"
(From row In Final_Dt.AsEnumerable()
Let newValue = "'" & row.Field(Of String)("Column0")
Let otherValues = row.ItemArray.Skip(1).Select(Function(x) "'" & x.ToString()).ToArray()
Select Final_Dt.Clone().Rows.Add({newValue}.Concat(otherValues).ToArray())
).CopyToDataTable()
Regards,
Vinit Mhatre
Hi @Gopi_Krishna1,
You should be making this change in your excel file using format cells activity. You can add additional zeros if your numbers going to be beyond 999.
Demo:
Code:
Main.xaml (14.5 KB)
Thnaks,
Ashok
Great its working as expected
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.