spread.activeswheet.savehtml(filename) issues

Posted by: mtony123 on 8 September 2017, 12:58 pm EST

  • Posted 8 September 2017, 12:58 pm EST

    This method does indeed save the spread to an HTML file, but there is no formatting, there is excel like row and column headers and the cells are not formatted (font, size, etc).  Is there a way to do this like the core ExportToHTML Spread 6 call.  We have the same spread in the the spread 6 version and the ExportToHTML works great, now in .Net, we are using the SaveHtml call (and have tried many others) and we get the HTML, but it looks like crap compared to the Spread 6 version.


    Please advise,


    Sean

  • Replied 8 September 2017, 12:58 pm EST

    http://www.clubfarpoint.com/FarPointSupportSite/Modules/Download/updates.aspx
  • Replied 8 September 2017, 12:58 pm EST

    I got the update and no luck.  We still get the following undesired results (please see the attached file):


    1.  We get the excel type headers (A, B..H, 1, 2...9, etc).


    2.  We get cell borders even though the spread that is displayed in the form does not have them displayed.


    3.  Cell formatting (mainly font) is not being applied to the exported HTML.


    Do you have a code snippet of what you are doing?  Please advise.


    Thanks,


    Sean


    2008/01/farpoint_export.JPG
  • Replied 8 September 2017, 12:58 pm EST

    Make sure you have the latest maintenance release.  In my test the fonts, colors, size etc. are showing up in the html file.
  • Replied 8 September 2017, 12:58 pm EST

    Can you please provide me a link to the Maint Rel download and I will test.  I have version Spread.Winforms.3.VX2005\v3.0.2003.  Also, i get the excel like row and column headers - like A, B...H and 1, 2...9, etc. 


     


    Please provide.

  • Replied 8 September 2017, 12:58 pm EST

    When we export to html we create a table so there's not a way to hide the headers and the gridlines of the table like you have in your spreadsheet.  In my test I set the font in the spread to Comic MS and it exported correctly.
  • Replied 8 September 2017, 12:58 pm EST

    The spread 6 exporttohtml handled all of this correctly, so are you saying that the .Net version does not support the same functionality?  If not, why not?  Will this functionality be added back in at some point in the future?
  • Replied 8 September 2017, 12:58 pm EST

    Hello,


    The headers being written out to HTML when they should not be is a known bug that will be fixed in the next maintenance release. The gridlines mistakenly being written to the HTML is a bug. I reported this as #21933 for the development team to fix for the next maintenance release. I was not able to reproduce the issue with the font not being written to the generated HTML correctly.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels