I am linking an external data to a spreadsheet. There is a header row, and the first column just has numbers, starting with 0, then goes up from there.
The problem is, the spreadsheet keeps showing the data as a date instead of a number. If I set the column format to a number, it then shows correctly, but when the data updates it goes back to a date. The sheet will not keep the formatting.
Is there any hint I can put in the data to tell calc that this is a number field, or specify the format in the html table, like a schema specification? I can't seem to find any information on this.
[Solved] Sheet wExternal Link keeps setting number as a date
[Solved] Sheet wExternal Link keeps setting number as a date
Last edited by Hagar Delest on Fri May 28, 2021 9:08 pm, edited 1 time in total.
Reason: tagged solved.
Reason: tagged solved.
OpenOffice 4.x on Win10 / OpenOffice 4.x on MacOS
Re: Sheet wExternal Link keeps setting number column to a da
As usual, what format has been set your document? xls, ods, other?
Co-admin french forum branch
Re: Sheet wExternal Link keeps setting number column to a da
Also important: What happens exactly? Which value is displayed as which date?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Sheet wExternal Link keeps setting number column to a da
My file is an ods calc document
I've added data via an external link which is a web page with just a table of data.
The numbers are unsigned integers, so I don't know why it feels that 0 or 14 is a date.
These pics posted in reverse order, so start from the bottom and work your way up.
At this point, I'm programming a macro to run before doing any processing to set the number format to 0
I've added data via an external link which is a web page with just a table of data.
The numbers are unsigned integers, so I don't know why it feels that 0 or 14 is a date.
These pics posted in reverse order, so start from the bottom and work your way up.
At this point, I'm programming a macro to run before doing any processing to set the number format to 0
- Attachments
-
- This is what the data looks like after I set the number format to -1234 from General
- Screen Shot 2021-05-27 at 10.31.14 AM.png (13.06 KiB) Viewed 1879 times
-
- This is how the data looks after import/update
- Screen Shot 2021-05-27 at 10.30.55 AM.png (13.72 KiB) Viewed 1879 times
-
- This is the data in the html file, just a list of member ids
- Screen Shot 2021-05-27 at 10.32.45 AM.png (10.9 KiB) Viewed 1879 times
OpenOffice 4.x on Win10 / OpenOffice 4.x on MacOS
Re: Sheet wExternal Link keeps setting number column to a da
Remove the number format from the cells. "3rd Jan 1900" is just the same as 4. It is day number 4. All spreadsheet dates are formatted day numbers actually.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Sheet wExternal Link keeps setting number column to a da
Ok, maybe I haven't explained it clear enough.
I understand that 4 is Jan 3, 1900, but that's not the point.
I have started with a NEW sheet, and it's doing this.
I have TRIED setting the format to a number to get it to show correctly.
Once the data refreshes, it goes BACK to a default which is shown as a date. The column format by default is NOT set to a date format, it's just keeps showing it as a date.
No matter what I do, the data refresh will reset it back to showing as a date. It needs to be a number so it'll sort correctly and for the macros to work.
I understand that 4 is Jan 3, 1900, but that's not the point.
I have started with a NEW sheet, and it's doing this.
I have TRIED setting the format to a number to get it to show correctly.
Once the data refreshes, it goes BACK to a default which is shown as a date. The column format by default is NOT set to a date format, it's just keeps showing it as a date.
No matter what I do, the data refresh will reset it back to showing as a date. It needs to be a number so it'll sort correctly and for the macros to work.
OpenOffice 4.x on Win10 / OpenOffice 4.x on MacOS
Re: Sheet wExternal Link keeps setting number column to a da
Hallo
It look and sounds like you has changed the number-format in your Default-Style??
→[F11]→right-click on Default→modify→look in the Number-Tab and change back to Category:Number and Format:Standard.
It look and sounds like you has changed the number-format in your Default-Style??
→[F11]→right-click on Default→modify→look in the Number-Tab and change back to Category:Number and Format:Standard.
Libreoffice 7.4 on Debian 12 (Bookworm) (on RaspberryPI4)
Libreoffice 7.6 flatpak on Debian 12 (Bookworm) (on RaspberryPI4)
Re: Sheet wExternal Link keeps setting number column to a da
As long as I am not able to reproduce this strange issue, this is the only thing I can think of. Never encountered any "auto formatting" with links. May be an issue with the source HTML?karolus wrote:Hallo
It look and sounds like you has changed the number-format in your Default-Style??
→[F11]→right-click on Default→modify→look in the Number-Tab and change back to Category:Number and Format:Standard.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Sheet wExternal Link keeps setting number column to a da
Thank you karolus, I think that resolved it!
It was set to user defined then general. After setting this like you state below, I did a refresh on the data and it stayed a number!
Wow, what a bizarre thing, but I'm new to OpenOffice, I would never have found this. Now I can remove the column formatting code from my macros.
It was set to user defined then general. After setting this like you state below, I did a refresh on the data and it stayed a number!
Wow, what a bizarre thing, but I'm new to OpenOffice, I would never have found this. Now I can remove the column formatting code from my macros.
karolus wrote:Hallo
It look and sounds like you has changed the number-format in your Default-Style??
→[F11]→right-click on Default→modify→look in the Number-Tab and change back to Category:Number and Format:Standard.
OpenOffice 4.x on Win10 / OpenOffice 4.x on MacOS