Hello,
Thanks for your response.
You mean that you hava some data in a format like "12,00" , and you want to save it as "12.00", right? If so, you could refer to the following code to replace the "," decimal separator to ".". And attached is my output file.
- Code: Select all
Dim dt As DataTable = New DataTable
dt.Columns.Add()
dt.Rows.Add("12,00")
dt.Rows.Add("34,00")
Dim workbook As Workbook = New Workbook
Dim sheet As Worksheet = workbook.Worksheets(0)
sheet.InsertDataTable(dt, True, 1, 1)
Dim i As Integer = 1
Do While (i <= dt.Rows.Count)
Dim range As CellRange = sheet.Rows(i).Cells(0)
Dim text As String = range.DisplayedText
Dim newText As String = text.Replace(",", ".")
range.Text = newText
i = (i + 1)
Loop
sheet.SaveToFile("result.csv", ";", Encoding.UTF8)
Or if your data is not like this, to help us further investigate your issue, please provide some sample data as well as your desired output for our reference. Thanks in advance.
Sincerely,
Rachel
E-iceblue support team