Make a new column.
Use formula
=$A1+0
and now extend this formula to all cells.
This is weired but works. And ofcourse is the most quick method I searched so far.
Question
I am using a Java program to extract the values from a SQLite file and storing them into an excel(.xls) file on UBUNTU.
As shown in snapshot, when integer values are store in the excel sheet a special character (') is being appended to the values(see formula bar in image) and hence values are being stored as String instead of int. Because of which I am not able to make chart using these values.
The java function I am using in the program is -
photoInfo.add(resultSet.getString(h));
photoInfo is an arrayList and have no function to add integers.
I already tried formatting the cell as integer but of no use.
This character(') only appears in formula bar and is not visible in excel cell.
Can someone please suggest how can I remove this non-alphanumeric character from all the values in one go. Please provide code in StarBasic (not in VBS) if any is available?
Solution
Make a new column.
Use formula
=$A1+0
and now extend this formula to all cells.
This is weired but works. And ofcourse is the most quick method I searched so far.
OTHER TIPS
Once the spreadsheet has been set up and you are ready to make charts, run this tiny VBA macro:
Sub tic_killer()
For Each r In ActiveSheet.UsedRange
If r.PrefixCharacter = "'" Then
r.Value = r.Value
End If
Next
End Sub