We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

currency formatting not showing in excel

Thread ID:

Created:

Updated:

Platform:

Replies:

59002 Apr 3,2007 09:26 AM UTC Apr 4,2007 01:32 PM UTC WinForms 2
loading
Tags: GridControl
Touqeer Ahmed Ahson
Asked On April 3, 2007 09:26 AM UTC



I am getting a minor problem when exporting data from grid to Excell.
I have applied currency formatting on grid to a specific column, but when I export it to Excel, currency formatting is simply not there.

if grid shows $30.00, then excel is showing 30.

code I used for it is


Syncfusion.GridExcelConverter.GridExcelConverterControl gecc = new Syncfusion.GridExcelConverter.GridExcelConverterControl();

SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = "Files(*.xls)|*.xls";
saveFileDialog.DefaultExt = ".xls";

if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
try
{

gecc.GridToExcel(this.grdSpreadsheetANReport.Model, saveFileDialog.FileName,
Syncfusion.GridExcelConverter.ConverterOptions.Visible);
if (MessageBox.Show("Do you wish to open the xls file now?", "Export to Excel", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
System.Diagnostics.Process.Start(saveFileDialog.FileName);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);

}

}

return true;
}
catch (Exception objException)
{
throw objException;
}
}

any help .............
advace thanks

regards,
Touqeer.

haneefm [Syncfusion]
Replied On April 3, 2007 06:21 PM UTC

Hi Touqeer,

You would have to derive the GridExcelConverterControl class and implement the GridToExcel method. Please refer to the attached sample for more details and let me know if this helps.

Sample : GDBGCurrencyFormat.zip

Best regards,
Haneef

Touqeer Ahmed Ahson
Replied On April 4, 2007 01:32 PM UTC

Hi Haneef
it is working thanks a lot...:)

Best Regards,
Touqeer.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;