Posted 8 September 2017, 3:51 am EST
Hi,
In our derived FPSpread class, we have a context menu which includes four items, one for each type of export: XLS, XML, HTML, and text.
These four exports appear to behave substantially differently:
XLS: (FpSpread.SaveExcel(…))
* Does not honor the sort in the view model
* Does not honor column moves when MoveContent == false
* Always uses IFormatter of cell types to pass along cell formats to excel
Text: (SheetView.SaveTextFile(…))
* Honors the sort in the view model
* Honors column moves
* Can use IFormatter of cell types or not depending on parameter passed to SaveTextFile
HTML and XML: (SheetView.SaveHtml(…) and SheetView.SaveXml(…))
* Does not honor the sort in the view model
* Column moves (when MoveContent == false) cause it to match the incorrect header column with the data (PLEASE NOTE: DEFINITE BUG)
* Order of exported rows is random, if a sort has been applied to the view model of the sheet being exported. (PLEASE NOTE: DEFINITE BUG - only took the time to verify on Html export though)
* Does not use IFormatter - seems to just call ToString() on all Data Model cells.
The fact that SaveExcel does not honor column or row sorts seems awkward but it’s not a big deal.
The real problem is that SaveHtml and SaveXml are not at the level of polish or functionality of SaveTextFile. Is this something still being worked on? I know they are new to 3.0 so maybe they are as yet incomplete. It would be nice if they could use the IFormatter of the cell types, and it would be nice if they honored the sorts in both the rows and columns.
Also, the HTML table seems to have font sizes that can change from row to row - it would be nice if all rows used the same font. (Note: I think this may be related to the random order bug.)
So, my question is whether any of these issues are going to be changed in the future. As it is, I can’t see using SaveXml and SaveHtml. They would be great though, if they could be improved to the SaveTextFile level of polish.
Thanks very much for your help.