-
Notifications
You must be signed in to change notification settings - Fork 57
cell with float numbers and datetimes #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi! It seems like you forget to use number formats. For float/datetime cells it is required to set concrete number format.
|
Thanks. for date i had always same problem. where am I wrong? |
Can you say version of MS Office that you use? |
Hi! What NumberFormat to use for the separation of bits? Using Office 2019 last updates, RAD 10.3.2 last updates & fixes |
Hi! |
Я пытаюсь разделить число на разряды: tz.Styles[0].NumberFormat:='##'; - что использовать? Как я только не пытался: Подскажите, пожалуйста, какой формат использовать, чтобы число делилось на разряды так 999 999 999 999 и если число ноль, то ставилась одна цифра 0. |
Вообще-то это странно, т.к. в данном случае должно хватать формата "# ##0". И у меня даже excel 2003 с патчами разделяет нормально. |
Все равно не правильно проставляет формат, использовал несколько вариантов: Как видно, откуда то добавляются обратные слэши, даже если их не использовать в формате... Excel 2019 все обновления... |
Нашел правильный формат методом тыка! |
This kind of questions is almost impossible to solve without
There is probably some quirk inside generated XLSX, and why not - i found and documented few others back in 2013 - which can not properly be fixed without samples. Otherwise it will always be just randomly finding ad hoc work-arounds, that only can work with one specific project, and then next another projects would have to find different hacks. |
Hi,
I tried TZEXMLSS with delphi 10.0.
If I create a cell of type string or int everything is ok, but with float or datetime cells I have some problems.
I tried with
MyDoc.Sheets [0] .Cell [i, j] .Data: = FloatToStr (Mytab.Fields [i] .AsFloat); MyDoc.Sheets [0] .Cell [i, j] .CellType: = ZENumber;
and
MyDoc.Sheets [0] .Cell [i, j] .Data: = DateTimeToStr (Mytab.Fields [i] .Asdatetime); MyDoc.Sheets [0] .Cell [i, j] .CellType: = ZEDateTime;
and
TZXMLSSave.From(MyDoc).Charset('utf-8', TextConverter).Save(my_name);
but
in excel date cell is empty and float cell contain a date like 30/12/1899
can you help me?
The text was updated successfully, but these errors were encountered: