Export Issue in Excel 2007

Posted by: chrisjoo12 on 8 September 2017, 2:53 pm EST

  • Posted 8 September 2017, 2:53 pm EST

    i'll try to export Spread Sheet's data include data header like this... 

    spreadName.ActiveSheet.Protect = false;

    ret = spreadName.SaveExcel(filename, FarPoint.Win.Spread.Model.IncludeHeaders.ColumnHeadersCustomOnly ); 

     

    it's support to *.xls  format(Excel 97-2003) but NOT support to *.xlsx format(Excel 2007). 

    then, i was try to do this with the other property ... 

    spreadName.ActiveSheet.Protect = false;

    ret = spreadName.SaveExcel(filename, FarPoint.Excel.ExcelSaveFlags.UseOOXMLFormat ); 

    it's support *.xlsx format but NOT Export spread sheet's data header.

     

    how do i solve this ??

    i'd like to export to excel 2007 format(*.xlsx) with spread data header.

    thanks .  


     

     

  • Replied 8 September 2017, 2:53 pm EST

    Hello,

    You can use both the flags at the same time using the logical OR operator( | ), so that the Spread is exported to Excel 2007 format and even the custom column headers are saved, here is the line of code that you would need to use:

               fpSpread1.SaveExcel(filename,FarPoint.Excel.ExcelSaveFlags.UseOOXMLFormat | FarPoint.Excel.ExcelSaveFlags.SaveCustomColumnHeaders);

    Hope it will help you. Please let me know if you have any queries further.

    Thanks,

    Manpreet Kaur.

Need extra support?

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

Learn More

Forum Channels