Blazor XlsIo ExcelExportDataTableOptions - Ability to Set Multiple Options

Hi,

Can you please advise if it is possible to select multiple options for the ExportDataTable function? eg. I might want to detect column names and compute column formulas.

ExcelExportDataTableOptions is an enumeration and it seems to follow bitwise convention ( ie 1,2,4,8 etc). However if I use bitwise logic in the ExportDataTable function as shown following, it doesn't honor the options. eg. in the below option, it does not detect column headers.

   var wbsData = wks.ExportDataTable(wks.UsedRange, 
ExcelExportDataTableOptions.ColumnNames &
ExcelExportDataTableOptions.ComputedFormulaValues);

I also note that there is no selection for the XlsIo control in the Post New Thread form for Blazor, so I just chose Grid.


3 Replies 1 reply marked as answer

KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team August 26, 2022 01:04 PM UTC

Hi Greg,


Greetings from Syncfusion.


We suggest you to use below modified code snippet to detect both column headers and computed formula values.


Code Snippet:


var wbsData = wks.ExportDataTable(wks.UsedRange,  ExcelExportDataTableOptions.ColumnNames | ExcelExportDataTableOptions.ComputedFormulaValues);


Regards,

Keerthi.


Marked as answer

GW Greg Wruck August 26, 2022 06:37 PM UTC

Thanks for the response - that works.



KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team August 29, 2022 08:04 AM UTC

Hi Greg,


We are glad that the provided information helped you. Kindly let us know if you need any further assistance.


Regards,

Keerthi.


Loader.
Up arrow icon