Hi Klas
oPrograma := WIN_OLECREATEOBJECT("com.sun.star.ServiceManager")
oPlanilla := oDesktop:loadComponentFromURL("private:factory/scalc", "_blank", 0, {})
oHoja := oPlanilla:getSheets:getByIndex(0)
Although Marek already suggested a change to me and it worked, I want to try this another.
Now with this modification:
oLocalSettings:= oPlanilla:getPropertyValue ('CharLocale')
oLocalSettings:language := "es"
oLocalSettings:country := "es"
oNumberFormats:=oPlanilla:numberFormats
lKey := oNumberFormats:queryKey("0,00", oLocalSettings, .t.)
If lKey = -1
lKey := oNumberFormats:addNew("0,00", oLocalSettings)
endif
But it does NOT do anything
Do you have a more complete example to share?
If you have any example of how to open an ods file, save some data in some cells and then save with another name, thank you.
It is a spreadsheet with many formulas, I am thinking that it would be better to have a formatted file and only save the data for the calculations.
Thank you very much for your attention
Enviados: Sábado, 7 de Noviembre 2020 8:58:04
Asunto: Re: [harbour-users] libreoffice, numeric cell format
To view this discussion on the web visit
https://groups.google.com/d/msgid/harbour-users/5e79c16d-9e2a-1ac2-7d29-43d30eb33235%40engwall.com.