Dear all,
(1) When I export ultragrid to excel using documentexporter, how to make the datetime field to be only date format in excel??
(2) What is this in below picture? How to make it disappear??
The code snippet in the linked worked. Thanks Mike.
Hi,
This question is answered several times on these forums. Here's a link to one of them.
Infragistics Excel 2009 - Infragistics Community
Dear Mike,
I am exporting the ultra grid to excel using the UltraGridExcelExporter using the below code:
SaveFileDialog SFD=new SaveFileDialog();
SFD.AddExtension = true; SFD.CheckFileExists = false; SFD.CheckPathExists = true; SFD.CreatePrompt = false; SFD.DefaultExt = "xls";
SFD.Filter = "Excel files (*.xls)|*.xls|All files (*.*)|*.*";
SFD.FilterIndex = 0;
SFD.InitialDirectory = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
SFD.Title = "Filename for Excel Export";
if (SFD.ShowDialog() == System.Windows.Forms.DialogResult=.OK) {
excelExporter.DefaultWorkbookPaletteMode = Infragistics.Excel.WorkbookPaletteMode. CustomPalette;
DialogResult dialogResult = Notification.NotificationManager.AskInformationYesNo("Open the excel file?" ,"Open File"; }
If you look at the below screen, the grid shows "dd-MMM-yy" format but the export shows "mm-dd-yyyy" format. I tried changing the regional settings on the computer but there was no luck. I had to manually change to a custom format in the excel. Could you please advise how to achieve the same format on my Grid in the excel export?
On what object are you setting RowSelectors to False? This can be set on the grid.DisplayLayout.Override, but it can also be set on the Override object on each band. The band settings is more specific and will therefore override the Layout setting.
If that doesn't help, then how are you determining that the RowSelectors property is set to False? Are you looking at the code or checking the property at run-time?
I recommend that you examine the property at run-time, because looking at the code is not always a good indicator of a property setting, since the property could be set at run-time by loading a layout or a preset into the grid.
Refer to point 2, It is set to false already.
But it still show in the ultragrid. Is there any missing??