Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a script that exports parts list data to an Excel template to create a BOM. From that BOM, the script reads data and writes it to a .csv file to be imported into our ERP system. My issue is that whenever there is a diameter symbol in a part description, the .csv file has "ø" instead of the diameter symbol (we use alt+0248 to create ø). Is there anything that can be done about this?
Here is the part of my code that creates the .csv:
SyntaxEditor Code Snippet
'Export to .csv Dim oFile As System.IO.File Dim oWrite As System.IO.StreamWriter csv_filename = filepath & name & ".csv" oWrite = oFile.CreateText(csv_filename) For rownum = 1 To 1000 exportdata = GoExcel.CellValues(filepath & name & ".xlsx", "Export", "A" & CStr(rownum), "I" & CStr(rownum)) If GoExcel.CellValue(filepath & name & ".xlsx", "Export", "A" & CStr(rownum)) = " " GoTo Skip Else oWrite.Write(exportdata.Item(0) & ",") oWrite.Write(",") For i As Integer = 1 To exportdata.Count - 1 oWrite.Write(exportdata.Item(i) & ",") Logger.Debug(exportdata.Item(i)) Next oWrite.WriteLine() End If Next skip : oWrite.Close()
Using the log I am able to see that the diameter symbol appears correctly up to the point where the data is written to the csv. The problem with the translation occurs in the owrite command.
Solved! Go to Solution.