A leading apostrophe signifies that the cell should be treated as text in Libreoffice (same as in Excel).The apostrophe can only be seen in the Formula bar when selecting the cell, and otherwise stays invisible.
Create a new libreoffice file and type '123456
in A1
.
The leading apostrophe can be removed manually with Find
and Replace
method.
I want to delete it with macro code:
Sub ReadNumber()
Dim oSheet As Object
Dim oCell As Object
oSheet = ThisComponent.Sheets.getByName("Sheet1")
oCell = oSheet.getCellByPosition(0, 0)
msgbox oCell.string
end sub
123456
will be shown in message box ,instead of '123456
.It canât be read ,how can remove it with macro code then?