How can write a macro to convert all data in the cell?

Please download the sample.xlsx for data conversion.
All data type is text except one empty cell in sample.xlsx.
How can convert data in the cell as below with libreoffice basic?

q2 2025                  -->  text unchanged
jun 30, 2025             -->  text to date :   jun 30,2025 
22,496                   -->  text to number : 22496  
-11.78%                  -->  text to number : 0.1178
(18618)                  -->  text to number:  -18618
                         -->  text (empty)to number:  0
-                        -->  text to number : 0

sample.xlsx (6.0 KB)

the q2 is a constant string, or is it mean: quarter 1, 2, 3, 4?

q2 2025 mean: quarter 2 on 2025 year, is there a date type which can express quarter in libreoffice?

?? If exppress is “show” this is a possible format-code Q for dates. But, if need to calculate with the number from 1 to 4 you need to do the necessary division from the month-number yourself.

https://help.libreoffice.org/latest/en-US/text/shared/01/05020301.html?&DbPAR=SHARED&System=UNIX

The Date and the Time values always are double precision floating numbers in the Calc application - with or without decimal fraction part (for the Dates) or sometimes with zero integer part (for the Times).
There is not other “Date TYPES”. Only the FORMAT of them can be different. And there are recognizable and not recognizable textual formats of a date. The main (default) recognizable is the ISO Standard format: YYYY-MM-DD HH:MM:SS
But there are some format codes in the locales for the formatting dates as Quarters of a year: