Hi @vib, thanks … Even me also got it From Japanese Website Just Translate From your browser.
Website
I just add additional Code for New Data, for learning purpose.
Formatting C3:C5 As Date Format
Here is the Code
Sub FontProperties
Dim Doc As Object, oSheets As Object, Range As Object, oRange As Object
Doc = Thiscomponent : oSheets = Doc.Sheets(2)
Range = oSheets.getCellRangeByName("A2:D2")
With Range
.CharWeight = com.sun.star.awt.FontWeight.BOLD
.CharFontName = "Calibri"
.CharFontNameAsian = "Calibri"
.CharHeight = 14
.Columns.OptimalWidth = True
.CellBackColor = RGB(153, 204, 255)
.HoriJustify = com.sun.star.table.CellHoriJustify.CENTER
.VertJustify = com.sun.star.table.CellVertJustify.CENTER
.CharColor = RGB(255, 255, 255) ' Font Color As White Color
End With
Dim NumberFormats As Object, NumberFormatString As String, NumberFormatId As Long
Dim LocalSettings As New com.sun.star.lang.Locale
oRange = oSheets.getCellRangeByName("C3:C5")
With oRange
LocalSettings.Country = "en"
LocalSettings.Language = "IN"
NumberFormats = Doc.NumberFormats
NumberFormatString = "DD/MM/YYYY" 'What should I use to format as a date? Tried lots of things.
NumberFormatId = NumberFormats.queryKey(NumberFormatString, LocalSettings, True)
If NumberFormatId = -1 Then
'Next line gives RunTime error '1' : RunTimException
NumberFormatId = NumberFormats.addNew(NumberFormatString, LocalSettings)
End If
End With
oRange.NumberFormat = NumberFormatId
End Sub
Screen Shot of Before Running Macro

Screen Shot of After Running Macro

Thanks… @vib