Recent

Author Topic: WriteTextAsHTML bold show incorrectly in Excel or Calc [SOLVED by wp]  (Read 2842 times)

totya

  • Hero Member
  • *****
  • Posts: 720
Hi wp master!

See attached sample. See Destination.xls after run, in Excel or in LibreOffice Calc. (You see colored text lol).

Thank you!

Edit: fps rev: 6286, Lazarus+fpc: latest fixes.
« Last Edit: April 05, 2018, 07:35:22 pm by totya »

wp

  • Hero Member
  • *****
  • Posts: 11854
Re: WriteTextAsHTML bold show incorrectly in Excel or Calc
« Reply #1 on: April 05, 2018, 12:51:55 pm »
Font #4 hell... The early versions of Excel allowed only four fonts, and their indexes were 0-based. Later they decided to increase the font count, but switched to a 1-based numbering scheme. This means that Font #4 does not exist in an Excel xls file. fpspreadsheet, of course, does not have this gap...

While the gap is corrected at most places in fpspreadsheet the issue still existed on the SST (shared-string-table) which had to be introduced recently because non-SST strings are truncated after 255 characters.

Life is hard.

Please have a look at the current revision.

totya

  • Hero Member
  • *****
  • Posts: 720
Re: WriteTextAsHTML bold show incorrectly in Excel or Calc
« Reply #2 on: April 05, 2018, 07:35:01 pm »
Life is hard. Please have a look at the current revision.

The life is hard, but you are the best :) It seems to me, the latest rev works correctly in my demo app, and in my real app. I'm sorry but in my worksplace we are use Office XP...

Thank you master!

 

TinyPortal © 2005-2018