Hi.
I am trying to replace specific characters when exporting to excel as it doesn't recognise the contents as numeric data when I do not. I have managed to get it working for the normal cells but it I cannot seem to get it working for the footers.
Please find my code snippet below, and advise on any possible ways to do this.
On to the second issue, how/where can I do the same as the above, but for csv export? As there isn't a csvExportFormatting event.
Any and all help will be greatly appreciated.
Kind regards.
Leon Havenga
I am trying to replace specific characters when exporting to excel as it doesn't recognise the contents as numeric data when I do not. I have managed to get it working for the normal cells but it I cannot seem to get it working for the footers.
Please find my code snippet below, and advise on any possible ways to do this.
Protected
Sub
grdSingleCurrency_ExportCellFormatting(sender
As
Object
, e
As
ExportCellFormattingEventArgs)
Handles
grdSingleCurrency.ExportCellFormatting, grdHoldingsSummary.ExportCellFormatting,
grdMultiCash.ExportCellFormatting, grdMultiCurrency.ExportCellFormatting, grdSingleCash.ExportCellFormatting
If
(
Not
String
.IsNullOrWhiteSpace(e.Cell.Text))
Then
e.Cell.Text = e.Cell.Text.Replace(
","
,
String
.Empty).Replace(
" "
,
String
.Empty)
End
If
If
(
Not
String
.IsNullOrWhiteSpace(e.FormattedColumn.FooterText))
Then
e.FormattedColumn.FooterText.Replace(
","
,
String
.Empty)
End
If
End
Sub
On to the second issue, how/where can I do the same as the above, but for csv export? As there isn't a csvExportFormatting event.
Any and all help will be greatly appreciated.
Kind regards.
Leon Havenga